summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-18 16:34:37 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-18 16:34:37 +0100
commitf36447921f11d651503bf38f3d2533f286cf569c (patch)
tree7fc5267808d21ec1aeefeff4bb52006b44a66936 /core/src/ch/asynk/tankontank
parent1277b7ba2cd2e0fd4dd6aab3c17162acd89bf16a (diff)
downloadRustAndDust-f36447921f11d651503bf38f3d2533f286cf569c.zip
RustAndDust-f36447921f11d651503bf38f3d2533f286cf569c.tar.gz
Hud: factorize closeDialog()
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/game/Hud.java8
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;
}