API:ActionButtonGroupSetTimeAbbreviations
From RoR Wiki
UI Lua API · ActionButtonGroup functions
Version: WAR 1.4.8
Sets the unit abbreviations an ActionButtonGroup appends to its cooldown countdowns.
ActionButtonGroupSetTimeAbbreviations(groupName, days, hours, minutes, seconds)
Arguments
- groupName
string– Name of an ActionButtonGroup window.- days
wstring– Abbreviation for days.- hours
wstring– Abbreviation for hours.- minutes
wstring– Abbreviation for minutes.- seconds
wstring– Abbreviation for seconds.
Returns
Nothing.
Details
- The four strings are stored on the group in the order given. The argument names follow the strings the stock UI passes.
- The countdown text of ActionButtonGroupSetTimer only shows whole minutes or seconds, so only the
minutesandsecondsstrings appear on the buttons. - All four must be wide strings. A plain Lua string raises an Invalid Parameters error.
Errors
Error in function call 'ActionButtonGroupSetTimeAbbreviations': Window %s does not existError in function call 'ActionButtonGroupSetTimeAbbreviations': Window %s is not a ActionButtonGroup
Example
From ea_backpackwindow/source/backpackiconview.lua:
ActionButtonGroupSetTimeFormat( pocketName.."Buttons", Window.TimeFormat.LARGEST_UNIT_TRUNCATE )
ActionButtonGroupSetTimeAbbreviations( pocketName.."Buttons",
GetString(StringTables.Default.LABEL_TIMER_DAYS_ABBREVIATION),
GetString(StringTables.Default.LABEL_TIMER_HOURS_ABBREVIATION),
GetString(StringTables.Default.LABEL_TIMER_MINUTES_ABBREVIATION),
GetString(StringTables.Default.LABEL_TIMER_SECONDS_ABBREVIATION) )
