Class Cursor

Allows you to manipulate the platform cursor in various ways.

Thread safe.

Constructors

Accessors

  • get isCursorHidden(): boolean
  • Determines if the cursor is hidden.

    Returns boolean

Methods

  • Removes a custom cursor icon and releases any data associated with it.

    Parameters

    • options: {
          name: string;
      } | {
          type: EnumValue<CursorType, number>;
      }

      Options object for the function call.

    Returns void

  • Disables cursor clipping that was set using any of the clipTo* methods.

    Returns void

  • Limit cursor movement to specific area on the screen.

    Parameters

    Returns void

  • Hides the cursor.

    Returns void

  • Sets a cursor icon. Uses one of the built-in cursor types.

    Parameters

    • options: {
          type: EnumValue<CursorType, number>;
      } | {
          name: string;
      }

      Options object for the function call.

    Returns void

  • Registers a new custom cursor icon you can then set by calling "setCursor".

    Parameters

    Returns void

    Stores an internal copy of the pixel data. Clear it by calling removeCursorIcon(). If a custom icon with the same name already exists it will be replaced.

  • Shows the cursor.

    Returns void