Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:WindowUnregisterEventHandler

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

Removes a window's handler for a game event.

WindowUnregisterEventHandler(windowName, eventId)

Arguments

windowName
string – Name of the window that owns the handler.
eventId
number – The event, usually a SystemData.Events.* value.

Returns

Nothing.

Details

  • Removes the handler added with WindowRegisterEventHandler for this window and event.
  • If the window has no handler for the event, nothing happens.
  • eventId is truncated to a whole number.
  • The function needs at least two arguments and only reads the last two.

Errors

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

Example

From easystem_utils/source/datautils.lua:

function DataUtils.Shutdown ()
    WindowUnregisterEventHandler ("Root", SystemData.Events.ITEM_SET_DATA_ARRIVED)
    -- ...
end

See also