diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-02-15 17:40:28 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-02-15 17:40:28 +0100 |
commit | 41752ef3daa47df541ed4faef62f0d79aaf009e3 (patch) | |
tree | 71469dfcdd16b8117b9234df030a2c29c6a3c80f | |
parent | 74ad2af35e4bf812fb6d4f3af64b7a3b6b37b2cf (diff) | |
download | RustAndDust-41752ef3daa47df541ed4faef62f0d79aaf009e3.zip RustAndDust-41752ef3daa47df541ed4faef62f0d79aaf009e3.tar.gz |
ScenariosMenu: support scenario unselect
-rw-r--r-- | core/src/ch/asynk/tankontank/menu/ScenariosMenu.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/menu/ScenariosMenu.java b/core/src/ch/asynk/tankontank/menu/ScenariosMenu.java index d701a50..40ec133 100644 --- a/core/src/ch/asynk/tankontank/menu/ScenariosMenu.java +++ b/core/src/ch/asynk/tankontank/menu/ScenariosMenu.java @@ -88,7 +88,10 @@ public class ScenariosMenu extends Patch } else { for (int i = 0; i <battleLabels.length; i++) { if (battleLabels[i].hit(x, y)) { - game.config.battle = game.factory.battles[i]; + if (game.config.battle == game.factory.battles[i]) + game.config.battle = null; + else + game.config.battle = game.factory.battles[i]; } } } |