}
@Override
public void processMousePosition(Vector2i position) {
if (clickedRegion != null) {
Vector2i relPos = new Vector2i(position);
relPos.sub(clickedRegion.offset);
clickedRegion.listener.onMouseDrag(relPos);
}
Set<InteractionRegion> newMouseOverRegions = Sets.newLinkedHashSet();
Iterator<InteractionRegion> iter = interactionRegions.descendingIterator();
while (iter.hasNext()) {
InteractionRegion next = iter.next();
if (next.region.contains(position)) {
Vector2i relPos = new Vector2i(position);
relPos.sub(next.offset);
next.listener.onMouseOver(relPos, newMouseOverRegions.isEmpty());
newMouseOverRegions.add(next);
}
}