LIL is a Language Make games, nicely

@mouseEvent

The data that is passed to mouse tracking listeners

Example code

var mouseEvent: @mouseEvent {
	clickCount: clickCount;
	x: x => f32;
	y: y => f32;
};
msgEmit(`onClick`, pointerTo mouseEvent);

Member variables

  • clickCount

    Type: var.i64

    How many clicks have happened in succession.

    if mouseEvent.clickCount = 2 {
    	print "Double click";
    }
  • x

    Type: var.f32

    The location in the horizontal axis of where the event happened, in window coordinates.

    var mouseX: mouseEvent.x;
  • y

    Type: var.f32

    The location in the vertical axis of where the event happened, in window coordinates.