From c547c362867a5eb7be43c145613270a885c4b5a6 Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Fri, 22 Mar 2019 15:25:59 -0700 Subject: [PATCH] Tapping button to close quick spells panel will not longer cast spell --- core/src/com/riiablo/panel/MobileControls.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/com/riiablo/panel/MobileControls.java b/core/src/com/riiablo/panel/MobileControls.java index 8f5c4fab..e02b831a 100644 --- a/core/src/com/riiablo/panel/MobileControls.java +++ b/core/src/com/riiablo/panel/MobileControls.java @@ -91,7 +91,11 @@ public class MobileControls extends WidgetGroup implements Disposable { @Override public void tap(InputEvent event, float x, float y, int count, int button) { - gameScreen.spellsQuickPanelR.setVisible(false); + if (gameScreen.spellsQuickPanelR.isVisible()) { + gameScreen.spellsQuickPanelR.setVisible(false); + return; + } + HotkeyButton actor = (HotkeyButton) event.getListenerActor(); gameScreen.player.cast(actor.getSkill()); }