Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:SetItemDragging

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

Tells the client that something is being dragged on the cursor. While set, windows do not fire their game actions.

SetItemDragging(dragging)

Arguments

dragging
boolean – true while an icon is held on the cursor, false when it is released.

Returns

Nothing.

Details

  • While the flag is true, a window that has a game action does not run it when it is clicked, and WindowGameAction does nothing. The window's normal Lua handlers (OnLButtonUp and so on) still run.
  • The flag is off when the client starts and stays as set until changed again. Remember to clear it.
  • dragging must be a real boolean. Passing nil or a number raises an Invalid Parameters error.

Errors

None besides the Invalid Parameters argument check.

Example

From ea_cursor/source/cursor.lua, when an icon is picked up:

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

SetItemDragging(true)

and at the end of Cursor.Clear:

SetItemDragging(false)

See also