Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:WindowSetId

From RoR Wiki
Revision as of 19:51, 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 · Window functions
Version: WAR 1.4.8

Stores a number on a window as its id.

WindowSetId(windowName, id)

Arguments

windowName
string – Name of the window.
id
number – The id to store.

Returns

Nothing.

Details

  • The id is a free number for the UI's own use; the client only stores it. Read it back with WindowGetId.
  • id is truncated towards zero to a whole number.
  • There is no lock check in this function.
  • The function needs at least two arguments and only reads the last two.

Errors

  • Error in function call 'WindowSetId': Window %s does not exist

Example

From easystem_dialogmanager/source/dialogmanager.lua:

local warningButton = "TwoButtonDlg"..dlg.."BoxNeverWarnButton";
-- ...
WindowSetId (warningButton, dlg + DialogManager.NEVER_WARN_ID_OFFSET);

See also