API:WindowGameAction
From RoR Wiki
UI Lua API · Window functions
Version: WAR 1.4.8
Carries out the game action attached to a window.
WindowGameAction(windowName)
Arguments
- windowName
string– Name of the window.
Returns
Nothing.
Details
- The client runs the game action that was attached to the window with WindowSetGameActionData.
- Nothing happens if the window has no game action. The client also skips the action unless a flag on the window is set and a client-wide flag is clear; what controls these flags could not be determined.
- The stock action buttons call it from their click handler for slots that do not need special handling (see the example).
- The function needs at least one argument and only reads the last one.
Errors
This is written to the UI log; the call returns normally.
Error in function call 'WindowGameAction': Window %s does not exist
Example
From ea_actionbars/source/actionbutton.lua, where an action button runs its action from a click handler:
else
WindowGameAction( SystemData.ActiveWindow.name )
end
