@mouseEvent
The data that is passed to mouse tracking listeners
The data that is passed to mouse tracking listeners
var mouseEvent: @mouseEvent {
clickCount: clickCount;
x: x => f32;
y: y => f32;
};
msgEmit(`onClick`, pointerTo mouseEvent);
Type: var.i64
How many clicks have happened in succession.
if mouseEvent.clickCount = 2 {
print "Double click";
}
Type: var.f32
The location in the horizontal axis of where the event happened, in window coordinates.
var mouseX: mouseEvent.x;
Type: var.f32
The location in the vertical axis of where the event happened, in window coordinates.
To gain a better understanding of this class, it is recommended to look at the source code of the following file: