Search in sources :

Example 1 with NUIMouseReleaseEvent

use of org.terasology.rendering.nui.events.NUIMouseReleaseEvent in project Terasology by MovingBlocks.

the class CanvasImpl method processMouseRelease.

@Override
public boolean processMouseRelease(MouseInput button, Vector2i pos) {
    if (clickedRegion != null) {
        Vector2i relPos = new Vector2i(pos);
        relPos.sub(clickedRegion.region.min());
        clickedRegion.listener.onMouseRelease(new NUIMouseReleaseEvent(mouse, keyboard, relPos, button));
        clickedRegion = null;
        return true;
    }
    return false;
}
Also used : NUIMouseReleaseEvent(org.terasology.rendering.nui.events.NUIMouseReleaseEvent) Vector2i(org.terasology.math.geom.Vector2i) BaseVector2i(org.terasology.math.geom.BaseVector2i)

Aggregations

BaseVector2i (org.terasology.math.geom.BaseVector2i)1 Vector2i (org.terasology.math.geom.Vector2i)1 NUIMouseReleaseEvent (org.terasology.rendering.nui.events.NUIMouseReleaseEvent)1