Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:RegisterWindowSet

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

Registers the Lua functions that build and tear down one of the client's window sets (title screen, login, character select, loading screen, in-game and so on).

RegisterWindowSet(setId, createFunctionName, shutdownFunctionName)

Arguments

setId
number – Id of the window set. The stock UI uses 0 to 6 (see the example).
createFunctionName
string – Dotted name of the Lua function that creates the set's windows.
shutdownFunctionName
string – Dotted name of the Lua function that removes them.

Returns

Nothing.

Details

  • When the client switches to another window set, it first calls the shutdown function registered for the set it is leaving, then stores the new set id and calls the create function of the new set.
  • After the create function returns, the client resolves the anchors of the windows and, if the UiLog text log is enabled, logs Window Set #%02d Loaded (Window Creation: %d ms, %.02f).
  • Only the first registration for a set id counts. Later calls with the same id are ignored.

Errors

None besides the Invalid Parameters argument check.

Example

From interfacecore/interfacecore.lua:

RegisterWindowSet(0, "InterfaceCore.CreateTitleInterface", "InterfaceCore.ShutdownTitleInterface" )
RegisterWindowSet(1, "InterfaceCore.CreateServerSelectionInterface", "InterfaceCore.ShutdownServerSelectionInterface" )
RegisterWindowSet(2, "InterfaceCore.CreateLoginInterface", "InterfaceCore.ShutdownLoginInterface" )
RegisterWindowSet(3, "InterfaceCore.CreateQuickStartInterface", "InterfaceCore.ShutdownQuickStartInterface" )
RegisterWindowSet(4, "InterfaceCore.CreateCharacterSelectionInterface", "InterfaceCore.ShutdownCharacterSelectionInterface" )
RegisterWindowSet(5, "InterfaceCore.CreateLoadingInterface", "InterfaceCore.ShutdownLoadingInterface" )
RegisterWindowSet(6, "InterfaceCore.CreatePlayInterface", "InterfaceCore.ShutdownPlayInterface" )

See also