summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-07 23:19:40 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-07 23:19:40 +0200
commit67b902f5b1fae988b3d22d1379b14650b7124520 (patch)
treeebd2c7b743de17313d4df458db573d9348a2c8de
parentd8576065e7d82c754ba514bb3ede29bc84af71ca (diff)
downloadRustAndDust-67b902f5b1fae988b3d22d1379b14650b7124520.zip
RustAndDust-67b902f5b1fae988b3d22d1379b14650b7124520.tar.gz
Hud: no not accept cancelBtn hit when disabled
-rw-r--r--core/src/ch/asynk/tankontank/game/Hud.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java
index 3c06b05..46fdb47 100644
--- a/core/src/ch/asynk/tankontank/game/Hud.java
+++ b/core/src/ch/asynk/tankontank/game/Hud.java
@@ -178,7 +178,7 @@ public class Hud implements Disposable
{
if (!rect.contains(x,y)) return false;
- if (cancelBtn.hit(x, y)) {
+ if (!cancelBtn.isDisabled() && cancelBtn.hit(x, y)) {
cancelBtn.setOn();
}
@@ -198,7 +198,7 @@ public class Hud implements Disposable
// switchTo(GameState.State.ATTACK);
}
}
- if (cancelBtn.hit(x, y)) {
+ if (!cancelBtn.isDisabled() && cancelBtn.hit(x, y)) {
reset();
ctrl.abort();
}