From 45b5c6aea9d6b38389818ce66f93973ac167529d Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 10 Feb 2025 14:39:12 -0500 Subject: [PATCH] v3.0.0: fixed errors when an item slot was deactivated while held --- .../shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java index 6cfc68843..e30acf430 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java @@ -307,6 +307,13 @@ public class ItemSlot extends Button { public void enable( boolean value ) { active = value; + //reset properties if was pressed + if (!active && pressedButton == this){ + hotArea.reset(); + pressedButton = null; + clickReady = false; + onPointerUp(); + } float alpha = value ? ENABLED : DISABLED; sprite.alpha( alpha );