API:WindowUnregisterEventHandler
From RoR Wiki
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 aSystemData.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.
eventIdis 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
