API:ActionButtonGroupSetShowing
From RoR Wiki
UI Lua API · ActionButtonGroup functions
Version: WAR 1.4.8
Shows or hides one button of an ActionButtonGroup.
ActionButtonGroupSetShowing(groupName, buttonIndex, show)
Arguments
- groupName
string– Name of an ActionButtonGroup window.- buttonIndex
number– Button number, starting at 1. Fractions are dropped.- show
boolean–trueto show the button,falseto hide it.
Returns
Nothing.
Details
- The button's showing flag is set and the client updates the group's drawing data for that button. ActionButtonGroupGetShowing reads the flag back.
buttonIndexmust be between 1 and the number of buttons; otherwise the not a valid ButtonIndex error is logged.showmust be a real boolean. Passingnilor a number raises an Invalid Parameters error. The stock UI passes a comparison such ascareerLineId ~= nil.- The No window specified error exists in the client but cannot be raised: a missing name is replaced by an empty string first, which gives the does not exist error.
- The function needs at least three arguments and only reads the last three.
Errors
These are written to the UI log; the call returns normally.
Error in function call 'ActionButtonGroupSetShowing': Window %s does not exist.Error in function call 'ActionButtonGroupSetShowing': Window %s is not a ActionButtonGroupError in function call 'ActionButtonGroupSetShowing': '%d' is not a valid ButtonIndex. (NumButtons = '%d')Error in function call 'ActionButtonGroupSetShowing': No window specified.(never raised, see above)
Example
From ea_uimodwindow/source/uimodwindow.lua:
ActionButtonGroupSetShowing( windowName.."ScrollChildCareers", index, careerLineId ~= nil )
