From 1882bd46401fb02fb39dfc7b644881ef85ddf540 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 18 Apr 2016 21:36:12 -0400 Subject: [PATCH] v0.3.5: fixes for action indicator --- .../shatteredpixeldungeon/ui/ActionIndicator.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/ActionIndicator.java b/src/com/shatteredpixel/shatteredpixeldungeon/ui/ActionIndicator.java index 59dd322b5..20888278c 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ui/ActionIndicator.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ui/ActionIndicator.java @@ -20,6 +20,13 @@ public class ActionIndicator extends Tag { visible = false; } + @Override + public void destroy() { + super.destroy(); + instance = null; + action = null; + } + @Override protected void layout() { super.layout(); @@ -28,6 +35,8 @@ public class ActionIndicator extends Tag { icon.x = x + (width - icon.width()) / 2; icon.y = y + (height - icon.height()) / 2; PixelScene.align(icon); + if (!members.contains(icon)) + add(icon); } } @@ -43,6 +52,7 @@ public class ActionIndicator extends Tag { if (!visible && action != null){ visible = true; + updateIcon(); flash(); } else { visible = action != null;