summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-02-01 10:02:15 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-02-01 10:02:15 +0100
commit11ee5ac82845d152712766d6190cee7b74990196 (patch)
tree6cc599e563c0d528479199613d9cfeb3e1806e59 /core/src/ch/asynk
parent5305b6ff892ed32a3b14019bf1a751d2fffb3286 (diff)
downloadRustAndDust-11ee5ac82845d152712766d6190cee7b74990196.zip
RustAndDust-11ee5ac82845d152712766d6190cee7b74990196.tar.gz
Hud: fix toggleOptionsPanel, do nothing if optionsPanel is not visible
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Hud.java2
1 files changed, 1 insertions, 1 deletions
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();
}