MouseEvent

class MouseEvent(val eventType: EventType<MouseEvent>, val scene: Scene, val sceneX: Float, val sceneY: Float, val buttonIndex: Int, val clickCount: Int, val mods: Int) : MouseEventBase

Used for event types EventType.MOUSE_PRESSED, EventType.MOUSE_RELEASED, EventType.MOUSE_CLICKED, EventType.MOUSE_MOVED, EventType.MOUSE_EXITED, EventType.MOUSE_ENTERED and EventType.MOUSE_DRAGGED.

Constructors

Link copied to clipboard
constructor(eventType: EventType<MouseEvent>, scene: Scene, sceneX: Float, sceneY: Float, buttonIndex: Int, clickCount: Int, mods: Int)

Properties

Link copied to clipboard
Link copied to clipboard

-1 = None, 0 = Left, 1 = Right, 2 = Middle.

Link copied to clipboard

0 = None, 1 = Left, 2 = Right, 3 = Middle.

Link copied to clipboard
Link copied to clipboard
open override val eventType: EventType<MouseEvent>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val mods: Int
Link copied to clipboard
Link copied to clipboard

The X position of the mouse, relative to the left of the scene. For a position relative to a node :

Link copied to clipboard

The X position of the mouse, relative to the top of the scene. For a position relative to a node :

Functions

Link copied to clipboard
fun capture()

Use within EventType.MOUSE_PRESSED events only to indicate that this node wants to recieve EventType.MOUSE_DRAGGED events until the mouse button is released. If called on other event types, it will be ignored.

Link copied to clipboard
fun consume()

Prevents further processing of this event.

Link copied to clipboard
Link copied to clipboard

On Windows, a popup trigger is when the secondary mouse button is PRESSED, and on all other platforms, it is when the secondary mouse button is RELEASED.

Link copied to clipboard
open override fun toString(): String