From 11ee5ac82845d152712766d6190cee7b74990196 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 1 Feb 2016 10:02:15 +0100 Subject: Hud: fix toggleOptionsPanel, do nothing if optionsPanel is not visible --- core/src/ch/asynk/rustanddust/game/Hud.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/ch/asynk/rustanddust/game/Hud.java b/core/src/ch/asynk/rustanddust/game/Hud.java index fea3b6f..2bf44ac 100644 --- a/core/src/ch/asynk/rustanddust/game/Hud.java +++ b/core/src/ch/asynk/rustanddust/game/Hud.java @@ -285,7 +285,7 @@ public class Hud implements Disposable, Animation private void toggleOptionsPanel() { if (dialogs.size() > 0) { - if (dialogs.peek() == optionsPanel) { + if (optionsPanel.visible && (dialogs.peek() == optionsPanel)) { optionsPanel.apply(); closeDialog(); } -- cgit v1.1-2-g2b99