summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/rustanddust/ui/Menu.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/ui/Menu.java b/core/src/ch/asynk/rustanddust/ui/Menu.java
index 78f5964..0ffc5f1 100644
--- a/core/src/ch/asynk/rustanddust/ui/Menu.java
+++ b/core/src/ch/asynk/rustanddust/ui/Menu.java
@@ -87,6 +87,18 @@ public class Menu extends Patch
}
@Override
+ public boolean hit(float x, float y)
+ {
+ for (int i = 0; i< menuItem.last(); i ++) {
+ if (labels[i].hit(x, y)) {
+ menuItem = menuItem.get(i);
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
public void draw(Batch batch)
{
if (!visible) return;