Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:ActionButtonGroupSetId

From RoR Wiki
Revision as of 19:40, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Stores a number on one button of an ActionButtonGroup.

ActionButtonGroupSetId(groupName, buttonIndex, id)

Arguments

groupName
string – Name of an ActionButtonGroup window.
buttonIndex
number – Button number, starting at 1.
id
number – The value to store. Fractions are dropped.

Returns

Nothing.

Details

  • The value is stored on the button and can be read back with ActionButtonGroupGetId.
  • The stock UI stores a career line id on each career icon and reads it back in the icon's tooltip handler.
  • buttonIndex must be between 1 and the number of buttons (see ActionButtonGroupSetNumButtons); otherwise the not a valid ButtonIndex error is logged. Fractions are dropped.
  • 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 'ActionButtonGroupSetId': Window %s does not exist
  • Error in function call 'ActionButtonGroupSetId': Window %s is not a ActionButtonGroup
  • Error in function call 'ActionButtonGroupSetId': '%d' is not a valid ButtonIndex. (NumButtons = '%d')

Example

From ea_uimodwindow/source/uimodwindow.lua:

if( careerLineId )
then

    local iconNum = Icons.GetCareerIconIDFromCareerLine(careerLineId)
    ActionButtonGroupSetIcon( windowName.."ScrollChildCareers", index, iconNum )
    ActionButtonGroupSetId( windowName.."ScrollChildCareers", index, careerLineId )
end

ActionButtonGroupSetShowing( windowName.."ScrollChildCareers", index, careerLineId ~= nil )

See also