API:SetItemDragging
From RoR Wiki
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–truewhile an icon is held on the cursor,falsewhen 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, andWindowGameActiondoes nothing. The window's normal Lua handlers (OnLButtonUpand so on) still run. - The flag is off when the client starts and stays as set until changed again. Remember to clear it.
draggingmust be a real boolean. Passingnilor 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
- SetCursor
WindowGameAction
