public void onTouchStart(Event.Impl[] touches) {
if (!enabled)
return;
if (listener != null)
listener.onTouchStart(touches);
GroupLayer root = PlayN.graphics().rootLayer();
if (root.interactive()) {
for (Event.Impl event : touches) {
Point p = new Point(event.x(), event.y());
root.transform().inverseTransform(p, p);
p.x += root.originX();
p.y += root.originY();
AbstractLayer hitLayer = (AbstractLayer)root.hitTest(p);
if (hitLayer != null) {
activeLayers.put(event.id(), hitLayer);
dispatcher.dispatch(hitLayer, LayerListener.class, event, START);
}
}
}
}