summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-05-20 05:00:12 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-05-20 05:00:12 +0200
commitb8822b195222203a713e73aa70bffde0f844406a (patch)
tree55a368dce8107081e81edf8cb19623be22759919
parente410ace9969b82b1419acef95b7728c93f05fd97 (diff)
downloadRustAndDust-b8822b195222203a713e73aa70bffde0f844406a.zip
RustAndDust-b8822b195222203a713e73aa70bffde0f844406a.tar.gz
OkCancel: hit returns false if not visible
-rw-r--r--core/src/ch/asynk/rustanddust/ui/OkCancel.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/ui/OkCancel.java b/core/src/ch/asynk/rustanddust/ui/OkCancel.java
index 5036995..75a8e23 100644
--- a/core/src/ch/asynk/rustanddust/ui/OkCancel.java
+++ b/core/src/ch/asynk/rustanddust/ui/OkCancel.java
@@ -71,6 +71,8 @@ public class OkCancel extends Patch
@Override
public boolean hit(float x, float y)
{
+ if (!visible)
+ return false;
if (!cancelBtn.visible && super.hit(x, y)) {
ok = true;
return true;