Skip to content

Commit

Permalink
Fix card text icons being misaligned
Browse files Browse the repository at this point in the history
  • Loading branch information
kiooeht committed Jan 27, 2023
1 parent 72f25f1 commit 54a3e71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Changelog ##
#### dev ####
* Make card text icon tooltips appear in the order they appear in the card text
* Fix card text icons being misaligned

#### 2.7.1 ####
* Fix rendering icons in library (NellyDevo)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class CardDescriptionCustomIcons {
@SpirePatch(clz=AbstractCard.class, method="renderDescription")
@SpirePatch(clz=AbstractCard.class, method="renderDescriptionCN")
public static class RenderSmallIcon {
private static final float CARD_ENERGY_IMG_WIDTH = 26.0f * Settings.scale;
private static final float CARD_ENERGY_IMG_WIDTH = 24.0f * Settings.scale;
private static final HashSet<AbstractCard> reinit = new HashSet<>();

@SpireInsertPatch(locator=Locator.class, localvars={"spacing", "i", "start_x", "draw_y", "font", "textColor", "tmp", "gl"})
Expand Down Expand Up @@ -99,7 +99,7 @@ public static void renderSCVIcon(AbstractCard card, SpriteBatch sb, AbstractCust

@SpirePatch(clz=AbstractCard.class, method="initializeDescription")
public static class AlterIconDescriptionSize {
private static final float CARD_ENERGY_IMG_WIDTH = 16.0f * Settings.scale;
private static final float CARD_ENERGY_IMG_WIDTH = 24.0f * Settings.scale;
@SpireInsertPatch(locator=Locator.class, localvars={"gl", "word"})
public static void Insert(AbstractCard __instance, @ByRef GlyphLayout[] gl, String word) {
if (word.length() > 0 && word.charAt(0) == '[') {
Expand Down

0 comments on commit 54a3e71

Please sign in to comment.