From b8822b195222203a713e73aa70bffde0f844406a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 20 May 2016 05:00:12 +0200 Subject: OkCancel: hit returns false if not visible --- core/src/ch/asynk/rustanddust/ui/OkCancel.java | 2 ++ 1 file changed, 2 insertions(+) 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; -- cgit v1.1-2-g2b99