Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: CursorInfo

[13:7] extends: FxObj

Wraps FXGL's CursorInfo data class (com.almasb.fxgl.app.CursorInfo). Bundles a cursor image asset name with its (hotspotX, hotspotY) click point. Used by GameSettings to register cursors for menu states.

Methods

  • CursorInfo (ImageName = null, double HotspotX = 0.0, double HotspotY = 0.0)

    Creates a new CursorInfo for the given image asset and hotspot. Pass null for ImageName to construct an empty wrapper for adopt.

    • @p ImageName is the cursor image asset name (under /assets/ui/cursors/), or null.
    • @p HotspotX is the click hotspot X in image coordinates.
    • @p HotspotY is the click hotspot Y in image coordinates.
  • adopt (object Ajo)

    Wraps an existing CursorInfo AussomJavaObject.

    • @p Ajo is an AussomJavaObject around a CursorInfo.
    • @r A new wrapper.
  • getImageName ()

    Returns the cursor image asset name.

    • @r A string.
  • getHotspotX ()

    Returns the cursor hotspot X coordinate.

    • @r A double.
  • getHotspotY ()

    Returns the cursor hotspot Y coordinate.

    • @r A double.