diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-02-02 15:06:46 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-02-02 15:06:46 +0100 |
commit | 08596cf6cb7ee5871932eecdbb5a2e4251cf92a3 (patch) | |
tree | 247590e03bdab328e45f419318568cbcb437d42e /core/src/ch/asynk/rustanddust | |
parent | 619bc54eb1d6f84937f35f00c55de74d22797d50 (diff) | |
download | RustAndDust-08596cf6cb7ee5871932eecdbb5a2e4251cf92a3.zip RustAndDust-08596cf6cb7ee5871932eecdbb5a2e4251cf92a3.tar.gz |
Hud: better fix for optionsBtn handling
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Hud.java | 4 | ||||
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/hud/OptionsPanel.java | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Hud.java b/core/src/ch/asynk/rustanddust/game/Hud.java index 2bf44ac..0e1ddec 100644 --- a/core/src/ch/asynk/rustanddust/game/Hud.java +++ b/core/src/ch/asynk/rustanddust/game/Hud.java @@ -285,8 +285,8 @@ public class Hud implements Disposable, Animation private void toggleOptionsPanel() { if (dialogs.size() > 0) { - if (optionsPanel.visible && (dialogs.peek() == optionsPanel)) { - optionsPanel.apply(); + if (dialogs.peek() == optionsPanel) { + optionsPanel.close(); closeDialog(); } } else { diff --git a/core/src/ch/asynk/rustanddust/game/hud/OptionsPanel.java b/core/src/ch/asynk/rustanddust/game/hud/OptionsPanel.java index ddb2aea..e7a4377 100644 --- a/core/src/ch/asynk/rustanddust/game/hud/OptionsPanel.java +++ b/core/src/ch/asynk/rustanddust/game/hud/OptionsPanel.java @@ -180,6 +180,13 @@ public class OptionsPanel extends Patch { } + public void close() + { + apply(); + objectivesPanel.visible = false; + this.visible = false; + } + @Override public void dispose() { |