summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-19 14:18:09 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-19 14:18:09 +0100
commit83eef7eeb4487083f67a9e6a30c8881354c18b3a (patch)
tree0be3f544e7e658e5c8536187ce444dc202ad8042 /core
parent914f2ca4d0569f37d712a54f498b8fc6765aed5f (diff)
downloadRustAndDust-83eef7eeb4487083f67a9e6a30c8881354c18b3a.zip
RustAndDust-83eef7eeb4487083f67a9e6a30c8881354c18b3a.tar.gz
Hud: differenciate END_TURN end ABORT_TURN
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/tankontank/game/Hud.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java
index 0c503bf..929fc87 100644
--- a/core/src/ch/asynk/tankontank/game/Hud.java
+++ b/core/src/ch/asynk/tankontank/game/Hud.java
@@ -38,6 +38,7 @@ public class Hud implements Disposable
enum DialogAction
{
EXIT_BOARD,
+ ABORT_TURN,
END_TURN,
END_DEPLOYMENT,
END_GAME
@@ -171,7 +172,11 @@ public class Hud implements Disposable
break;
case END_TURN:
if (ok)
- ctrl.abortPlayerTurn();
+ ctrl.endPlayerTurn(false);
+ break;
+ case ABORT_TURN:
+ if (ok)
+ ctrl.endPlayerTurn(true);
break;
case END_DEPLOYMENT:
if (ok)
@@ -203,7 +208,7 @@ public class Hud implements Disposable
public void askEndOfTurn()
{
ctrl.blockMap = true;
- dialogAction = DialogAction.END_TURN;
+ dialogAction = DialogAction.ABORT_TURN;
okCancel.show("You still have Action Points left.\nEnd your Turn anyway ?", Position.MIDDLE_CENTER);
}