From 9e14340a90945a17c0fa76fc9f82e76114cb8c65 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 8 Aug 2016 20:45:34 -0400 Subject: [PATCH] v0.4.1a: fixed quickslots not always updating properly --- .../shatteredpixeldungeon/sprites/ItemSprite.java | 4 ++++ src/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java | 1 + 2 files changed, 5 insertions(+) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSprite.java b/src/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSprite.java index b1110d0fa..bec6e7711 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSprite.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSprite.java @@ -193,6 +193,10 @@ public class ItemSprite extends MovieClip { return this; } + public void frame( int image ){ + frame( film.get( image )); + } + @Override public void kill() { super.kill(); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java b/src/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java index d888ca6a0..80a567a60 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java @@ -142,6 +142,7 @@ public class ItemSlot extends Button { public void item( Item item ) { if (this.item == item) { + if (item != null) icon.frame(item.image); updateText(); return; }