Skip to main content

FlixelMouseIconManager

View source

interface

org.flixelgdx.input.mouse.FlixelMouseIconManager

public interface FlixelMouseIconManager

Platform native cursor styling, exposed through FlixelMouseManager.icons.

Games that need the default Flixel cursor behavior never have to touch this type. When you do need OS-level feedback (text field, busy state, resize handles), call FlixelMouseIconManager.setCursor(FlixelMouseCursor) during UI transitions and FlixelMouseIconManager.resetCursor() when you are done.

Example:

Flixel.mouse.icons.setCursor(FlixelMouseCursor.IBEAM);
Flixel.mouse.icons.resetCursor();

See Also: FlixelMouseManager.icons

Methods

getCursor()

public default FlixelMouseCursor getCursor()

Returns the cursor that was last set via FlixelMouseIconManager.setCursor(FlixelMouseCursor), or FlixelMouseCursor.ARROW after construction or FlixelMouseIconManager.resetCursor().

Returns: The active cursor, never null.


setCursor(FlixelMouseCursor)

public void setCursor(FlixelMouseCursor cursor)

Applies a preset native cursor for this session.

Parameters:

NameDescription
cursorNon-null cursor kind; ignored on noop backends.

resetCursor()

public void resetCursor()

Restores the default cursor for this session.


supportsCursors()

public boolean supportsCursors()

Returns: true when FlixelMouseIconManager.setCursor(FlixelMouseCursor) may change what the user sees for this target.