API:WindowUnregisterCoreEventHandler
From RoR Wiki
UI Lua API · Window functions
Version: WAR 1.4.8
Removes the Lua handler of one of a window's core events.
WindowUnregisterCoreEventHandler(windowName, eventName)
Arguments
- windowName
string– Name of the window.- eventName
string– Name of the core event, for example"OnMouseWheel". See WindowRegisterCoreEventHandler for the list.
Returns
Nothing.
Details
- Removes the handler whether it was set in the window's XML or with WindowRegisterCoreEventHandler.
- If the window has no handler for the event, nothing happens.
- Unlike WindowRegisterCoreEventHandler, an unknown event name raises an error here.
- The function needs at least two arguments and only reads the last two.
Errors
Error in function call 'WindowUnregisterCoreEventHandler': Window %s does not existError in function call 'WindowUnregisterCoreEventHandler': Bad Event: %s does not exist
Example
Leaving key-binding mode, from ea_keymappingwindow/source/keymappingwindow.lua:
WindowUnregisterCoreEventHandler( KeyMappingWindow.bindingButtonName, "OnRawDeviceInput" ) WindowUnregisterEventHandler( KeyMappingWindow.bindingButtonName, SystemData.Events.L_BUTTON_UP_PROCESSED ) WindowUnregisterEventHandler( KeyMappingWindow.bindingButtonName, SystemData.Events.M_BUTTON_UP_PROCESSED ) WindowUnregisterEventHandler( KeyMappingWindow.bindingButtonName, SystemData.Events.R_BUTTON_UP_PROCESSED ) WindowUnregisterCoreEventHandler( "KeyMappingWindowActionsList", "OnMouseWheel" )
