v0.3.4: fixed a display issue with scroll/potion icons

This commit is contained in:
Evan Debenham 2016-01-16 00:37:30 -05:00 committed by Evan Debenham
parent 7c8b1b965e
commit 6cbd6af7ec

View File

@ -57,6 +57,7 @@ public class ItemSlot extends Button {
protected BitmapText topRight; protected BitmapText topRight;
protected BitmapText bottomRight; protected BitmapText bottomRight;
protected Image bottomRightIcon; protected Image bottomRightIcon;
protected boolean iconVisible = true;
private static final String TXT_STRENGTH = ":%d"; private static final String TXT_STRENGTH = ":%d";
private static final String TXT_TYPICAL_STR = "%d?"; private static final String TXT_TYPICAL_STR = "%d?";
@ -205,7 +206,7 @@ public class ItemSlot extends Button {
} else { } else {
iconInt = ((Potion) item).initials(); iconInt = ((Potion) item).initials();
} }
if (iconInt != null) { if (iconInt != null && iconVisible) {
bottomRightIcon = new Image(Assets.CONS_ICONS); bottomRightIcon = new Image(Assets.CONS_ICONS);
int left = iconInt*7; int left = iconInt*7;
int top = item instanceof Potion ? 0 : 8; int top = item instanceof Potion ? 0 : 8;
@ -242,5 +243,6 @@ public class ItemSlot extends Button {
if (BR) add( bottomRight ); if (BR) add( bottomRight );
else remove( bottomRight ); else remove( bottomRight );
iconVisible = BR;
} }
} }