diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-07 23:19:40 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-07 23:19:40 +0200 |
commit | 67b902f5b1fae988b3d22d1379b14650b7124520 (patch) | |
tree | ebd2c7b743de17313d4df458db573d9348a2c8de /core/src/ch/asynk/tankontank | |
parent | d8576065e7d82c754ba514bb3ede29bc84af71ca (diff) | |
download | RustAndDust-67b902f5b1fae988b3d22d1379b14650b7124520.zip RustAndDust-67b902f5b1fae988b3d22d1379b14650b7124520.tar.gz |
Hud: no not accept cancelBtn hit when disabled
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Hud.java | 4 |
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(); } |