From 176ca4399b902a723db12bb6af85d0550dd2d90a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sun, 12 Oct 2014 01:58:48 +0200 Subject: Button: do not hit if ON --- core/src/ch/asynk/tankontank/game/hud/Button.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/ch/asynk/tankontank/game/hud/Button.java b/core/src/ch/asynk/tankontank/game/hud/Button.java index b42a9cf..ea94c2c 100644 --- a/core/src/ch/asynk/tankontank/game/hud/Button.java +++ b/core/src/ch/asynk/tankontank/game/hud/Button.java @@ -91,7 +91,7 @@ public class Button implements Disposable public boolean hit(float x, float y) { - if (!visible) return false; + if (!visible || (idx == ON)) return false; return rect.contains(x,y); } -- cgit v1.1-2-g2b99