Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:SetHardwareCursor

From RoR Wiki
Revision as of 19:49, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Interface functions
Version: WAR 1.4.8

Switches the mouse pointer to one of the client's built-in cursor shapes.

SetHardwareCursor(cursorId)

Arguments

cursorId
number – Cursor number, 0 to 21. Use the SystemData.Cursor values. Fractions are dropped.

Returns

Nothing.

Details

  • The client loads the cursor image for that number from its own resources (some numbers are animated cursors) and makes it the Windows mouse pointer of the game window.
  • 0 is the normal arrow.
  • Numbers outside 0–21 are ignored without an error.
  • If the pointer already has the requested number, the shape is not reloaded.
  • 15 has no cursor image in the client: the pointer is set to no image.
  • The stock UI uses it to show the resize cursor while a window is being resized; ClearCursor sets the arrow back.
  • The function needs at least one argument and only reads the last one.

Errors

None besides the generic Invalid Parameters message when the argument is missing or not a number.

Example

From WindowUtils.BeginResize in easystem_windowutils/source/windowutils.lua:

WindowUtils.resizeEndCallback = endCallback
SetHardwareCursor(SystemData.Cursor.RESIZE2)

See also