Controls the cursor.

Works with this fork of hashlink : https://github.com/NeroGM/hashlink

Available since

0.1.0

.

Static variables

@:value(CursorKind.Arrow)staticcursor:CursorKind = CursorKind.Arrow

The last cursor set by this class. (Which is the current mouse cursor if you're not changing the cursor by other means.)

@:value(null)staticdefaultMoveTween:TweenType = null

The default nb.Tween.TweenType used by the moveTo function.

Static methods

@:value({ relative : true })staticgetCursorPosition(relative:Bool = true):Point

Returns the cursor position.

Parameters:

relative

If true the position will be relative to the window, otherwise it's a screen position.

Returns:

An h2d.col.Point containing the cursor position.

@:value({ relative : true })staticmoveTo(x:Int, y:Int, relative:Bool = true, ?twType:TweenType):Void

Tweens the cursor to a given position.

Parameters:

x

The x position.

y

The y position.

relative

If true the position is relative to the window, otherwise it's a screen position.

twType

The nb.Tween.TweenType that will be used to move the mouse to the given position. null, defaultMoveTween is used. If both are null, the default tween type of the tween function is used.

staticsetCursor(c:CursorKind):Void

Sets the cursor.

@:value({ relative : true })staticsetCursorPosition(x:Int, y:Int, relative:Bool = true):Void

Sets the cursor position.

Use the moveTo function for tweening.

Parameters:

x

The X coordinate.

y

The Y coordinate.

relative

If true the position is relative to the window, otherwise it's a screen position.