Tapping button to close quick spells panel will not longer cast spell

This commit is contained in:
Collin Smith 2019-03-22 15:25:59 -07:00
parent d388d23acd
commit c547c36286

View File

@ -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());
}