From 2d7e5754c85915800dfb5a206d642db4bb93bee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 28 Nov 2014 20:01:42 +0100 Subject: StateMove: show DONE only when activatedUnits > 0 --- core/src/ch/asynk/tankontank/game/states/StateMove.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/ch/asynk/tankontank/game/states/StateMove.java b/core/src/ch/asynk/tankontank/game/states/StateMove.java index d7d8dd6..32050a2 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateMove.java +++ b/core/src/ch/asynk/tankontank/game/states/StateMove.java @@ -9,8 +9,9 @@ public class StateMove extends StateCommon @Override public void enter(StateType prevState) { - boolean moreThanOne = ((map.moveableUnits.size() + map.activatedUnits.size()) > 1); - ctrl.hud.actionButtons.show((moreThanOne ? Buttons.DONE.b : 0) | (ctrl.cfg.canCancel ? Buttons.ABORT.b : 0)); + ctrl.hud.actionButtons.show( + ((map.activatedUnits.size() > 0) ? Buttons.DONE.b : 0) + | (ctrl.cfg.canCancel ? Buttons.ABORT.b : 0)); if (prevState == StateType.ESCAPE) { if (map.possiblePaths.size() == 1) -- cgit v1.1-2-g2b99