Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:ActionButtonGroupGetShowing

From RoR Wiki

Returns whether one button of an ActionButtonGroup is set to be shown.

showing = ActionButtonGroupGetShowing(groupName, buttonIndex)

Arguments

groupName
string – Name of an ActionButtonGroup window.
buttonIndex
number – Button number, starting at 1. Fractions are dropped.

Returns

showing
boolean – The button's showing flag, as set by ActionButtonGroupSetShowing.

Details

  • Only the button's own flag is read. Whether the group window itself is showing is not checked.
  • buttonIndex must be between 1 and the number of buttons; otherwise the not a valid ButtonIndex error is logged and nothing is returned.
  • If the window does not exist or is not an ActionButtonGroup, the error is logged and nothing is returned.
  • 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 two arguments and only reads the last two.
  • The stock UI never calls ActionButtonGroupGetShowing.

Errors

These are written to the UI log; the call returns normally.

  • Error in function call 'ActionButtonGroupGetShowing': Window %s does not exist.
  • Error in function call 'ActionButtonGroupGetShowing': Window %s is not a ActionButtonGroup
  • Error in function call 'ActionButtonGroupGetShowing': '%d' is not a valid ButtonIndex. (NumButtons = '%d')
  • Error in function call 'ActionButtonGroupGetShowing': No window specified. (never raised, see above)

Example

A minimal example built from the signature above:

if( ActionButtonGroupGetShowing( "MyButtonGroup", 2 ) ) then
    ActionButtonGroupSetShowing( "MyButtonGroup", 2, false )
end

See also