From 819928ad7abbb7bac19f6ce50c1cdb72f9ba79d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 19 Feb 2015 00:32:41 +0100 Subject: OkCancel: if cancelBtn is hidden, click everywhere is OK --- core/src/ch/asynk/tankontank/ui/OkCancel.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/ch/asynk/tankontank/ui/OkCancel.java b/core/src/ch/asynk/tankontank/ui/OkCancel.java index 3ed64d6..3dfd28d 100644 --- a/core/src/ch/asynk/tankontank/ui/OkCancel.java +++ b/core/src/ch/asynk/tankontank/ui/OkCancel.java @@ -81,6 +81,10 @@ public class OkCancel extends Patch @Override public boolean hit(float x, float y) { + if (!cancelBtn.visible && super.hit(x, y)) { + ok = true; + return true; + } if (okBtn.hit(x, y)) { ok = true; return true; -- cgit v1.1-2-g2b99