summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/tankontank/game/hud/Button.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/game/hud/Button.java b/core/src/ch/asynk/tankontank/game/hud/Button.java
index 2d344b4..4ce1120 100644
--- a/core/src/ch/asynk/tankontank/game/hud/Button.java
+++ b/core/src/ch/asynk/tankontank/game/hud/Button.java
@@ -14,6 +14,7 @@ public class Button implements Disposable
{
public int idx;
+ public boolean blocked;
public boolean visible;
private Image images [];
private Image image;
@@ -26,6 +27,7 @@ public class Button implements Disposable
public Button(TextureAtlas atlas, String base)
{
this.idx = OFF;
+ this.blocked = false;
this.visible = false;
this.images = new Image[3];
this.images[OFF] = new Image(atlas.findRegion(base + "-off"));
@@ -92,7 +94,7 @@ public class Button implements Disposable
public boolean hit(float x, float y)
{
- if (!visible || (idx == ON)) return false;
+ if (blocked || !visible || (idx == ON)) return false;
return rect.contains(x,y);
}