Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:SetCursor

From RoR Wiki
Revision as of 19:48, 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

Replaces the mouse cursor with an image built from a UI texture.

SetCursor(textureName)

Arguments

textureName
string – Name of a texture known to the UI, such as the texture name returned by GetIconData.

Returns

Nothing.

Details

  • The client looks the name up among the UI's registered textures, loads the image and builds a hardware cursor from it. The image data/gamedata/cursor_corner.tga is loaded as well and passed along with it when the cursor is built.
  • If no texture with that name is registered, the cursor is left unchanged.
  • The stock UI calls it when an icon is picked up and restores the normal cursor with ClearCursor.

Errors

None besides the Invalid Parameters argument check.

Example

From ea_cursor/source/cursor.lua:

local texture, x, y = GetIconData( Cursor.Data.IconId )
SetCursor( texture )

SetItemDragging(true)

See also