use of org.terasology.rendering.nui.events.NUIMouseWheelEvent in project Terasology by MovingBlocks.
the class CanvasImpl method processMouseWheel.
@Override
public boolean processMouseWheel(int wheelTurns, Vector2i pos) {
for (InteractionRegion next : mouseOverRegions) {
if (next.region.contains(pos)) {
Vector2i relPos = new Vector2i(pos);
relPos.sub(next.region.min());
if (next.listener.onMouseWheel(new NUIMouseWheelEvent(mouse, keyboard, relPos, wheelTurns))) {
clickedRegion = next;
nuiManager.setFocus(next.element);
return true;
}
}
}
return false;
}
Aggregations