diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-18 16:34:37 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-18 16:34:37 +0100 |
commit | f36447921f11d651503bf38f3d2533f286cf569c (patch) | |
tree | 7fc5267808d21ec1aeefeff4bb52006b44a66936 /core | |
parent | 1277b7ba2cd2e0fd4dd6aab3c17162acd89bf16a (diff) | |
download | RustAndDust-f36447921f11d651503bf38f3d2533f286cf569c.zip RustAndDust-f36447921f11d651503bf38f3d2533f286cf569c.tar.gz |
Hud: factorize closeDialog()
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Hud.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java index 09f2408..57d96fb 100644 --- a/core/src/ch/asynk/tankontank/game/Hud.java +++ b/core/src/ch/asynk/tankontank/game/Hud.java @@ -162,23 +162,23 @@ public class Hud implements Disposable private void closeDialog() { + boolean ok = okCancel.ok; switch(dialogAction) { case END_TURN: - if (okCancel.ok) + if (ok) ctrl.abortPlayerTurn(); - okCancel.visible = false; break; case END_DEPLOYMENT: - if (okCancel.ok) + if (ok) ctrl.endDeployment(); - okCancel.visible = false; break; case END_GAME: stats.visible = false; ctrl.endGame(); break; } + okCancel.visible = false; ctrl.blockMap = false; } |