From 6cbd6af7ec14ef1fdbbb387b8c5f15815611d8e7 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 16 Jan 2016 00:37:30 -0500 Subject: [PATCH] v0.3.4: fixed a display issue with scroll/potion icons --- src/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java b/src/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java index 70ba65dce..b87667cd8 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java @@ -57,6 +57,7 @@ public class ItemSlot extends Button { protected BitmapText topRight; protected BitmapText bottomRight; protected Image bottomRightIcon; + protected boolean iconVisible = true; private static final String TXT_STRENGTH = ":%d"; private static final String TXT_TYPICAL_STR = "%d?"; @@ -205,7 +206,7 @@ public class ItemSlot extends Button { } else { iconInt = ((Potion) item).initials(); } - if (iconInt != null) { + if (iconInt != null && iconVisible) { bottomRightIcon = new Image(Assets.CONS_ICONS); int left = iconInt*7; int top = item instanceof Potion ? 0 : 8; @@ -242,5 +243,6 @@ public class ItemSlot extends Button { if (BR) add( bottomRight ); else remove( bottomRight ); + iconVisible = BR; } }