diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/zproject/engine/ui/Assembly.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/core/src/ch/asynk/zproject/engine/ui/Assembly.java b/core/src/ch/asynk/zproject/engine/ui/Assembly.java index a8f00ab..3a52acd 100644 --- a/core/src/ch/asynk/zproject/engine/ui/Assembly.java +++ b/core/src/ch/asynk/zproject/engine/ui/Assembly.java @@ -8,6 +8,7 @@ import ch.asynk.zproject.engine.util.IterableSet; public abstract class Assembly extends Element { private IterableSet<Element> children; + private Element touched; public Assembly(int c) { @@ -28,11 +29,19 @@ public abstract class Assembly extends Element } } + public Element touched() + { + return touched; + } + @Override public boolean touch(float x, float y) { for (Element e : children) - if (e.touch(x, y)) + if (e.touch(x, y)) { + touched = e; return true; + } + touched = null; return false; } |