Cursor

UICursor class is a wrapper for the Cursor.SetCursor() to avoid conflicts between different widgets and components. For example Resizable component should not change the cursor if is controlled by the Drag-and-Drop component.

Fields

  • DefaultCursor Texture2D

    Default cursor.

  • DefaultCursorHotSpot Vector2

    Default cursor hot spot.

Methods

  • bool CanSet(Component owner)

    Is can the specified component set the cursor? true if cursor does not have an owner or the owner is the same.

  • Set(Component owner, Texture2D texture, Vector2 hotspot)

    Set the cursor.
    The cursor will be changed only if CanSet(owner) returns true.
  • Reset(Component owner)

    Reset cursor to the default.