summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-02-15 17:40:28 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-02-15 17:40:28 +0100
commit41752ef3daa47df541ed4faef62f0d79aaf009e3 (patch)
tree71469dfcdd16b8117b9234df030a2c29c6a3c80f /core/src/ch
parent74ad2af35e4bf812fb6d4f3af64b7a3b6b37b2cf (diff)
downloadRustAndDust-41752ef3daa47df541ed4faef62f0d79aaf009e3.zip
RustAndDust-41752ef3daa47df541ed4faef62f0d79aaf009e3.tar.gz
ScenariosMenu: support scenario unselect
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/tankontank/menu/ScenariosMenu.java5
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];
}
}
}