Novelty scripting reference > Scripted events > OnMouseLeave

OnMouseLeave

This event is triggered when the mouse cursor leaves the bounding rectangle of an object.

Remarks:

The mouse coordinates given are relative to the center of the scene. To make them relative to an object or the top left corner of scene use TransformToObjectCoord or TransformToSceneCoord respectively.


Implicit arguments

Object@ sender
Handle to an associated object; or null.

float mouseX
Horizontal cursor position.

float mouseY
Vertical cursor position.


Example

event Sample.OnMouseLeave
{
	// Get relative point where cursor left the object   
	Vector2 Point = TransformToObjectCoord(sender, mouseX, mouseY);
	Print(Point.AsString());
}

Back to top