v0.2.2: Corrected item slot display for keys
This commit is contained in:
parent
3706092e7b
commit
e10cdb3747
|
@ -60,9 +60,4 @@ public class Key extends Item {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String status() {
|
|
||||||
return depth + "*";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
*/
|
*/
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.ui;
|
package com.shatteredpixel.shatteredpixeldungeon.ui;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.keys.Key;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey;
|
||||||
import com.watabou.noosa.BitmapText;
|
import com.watabou.noosa.BitmapText;
|
||||||
import com.watabou.noosa.ui.Button;
|
import com.watabou.noosa.ui.Button;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
|
@ -45,6 +48,7 @@ public class ItemSlot extends Button {
|
||||||
|
|
||||||
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?";
|
||||||
|
private static final String TXT_KEY_DEPTH = "*%d";
|
||||||
|
|
||||||
private static final String TXT_LEVEL = "%+d";
|
private static final String TXT_LEVEL = "%+d";
|
||||||
|
|
||||||
|
@ -153,8 +157,11 @@ public class ItemSlot extends Button {
|
||||||
|
|
||||||
}
|
}
|
||||||
topRight.measure();
|
topRight.measure();
|
||||||
|
|
||||||
} else {
|
} else if (item instanceof Key && !(item instanceof SkeletonKey)) {
|
||||||
|
topRight.text(Utils.format(TXT_KEY_DEPTH, ((Key) item).depth));
|
||||||
|
topRight.measure();
|
||||||
|
} else {
|
||||||
|
|
||||||
topRight.text( null );
|
topRight.text( null );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user