Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:ActionButtonGroupSetTintColor

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)

Tints one button of an ActionButtonGroup.

ActionButtonGroupSetTintColor(groupName, buttonIndex, r, g, b)

Arguments

groupName
string – Name of an ActionButtonGroup window.
buttonIndex
number – Button number, starting at 1.
r, g, b
number – Red, green and blue on a 0–255 scale. 255, 255, 255 removes the tint.

Returns

Nothing.

Details

  • Bug: the client reads the green value twice and never reads b. The blue channel is always set to the same value as green. Grey tints (r = g = b), which is what the stock UI mostly uses, are not affected.
  • The values are divided by 255 (fractions are kept). The alpha used is the group's own opacity.
  • The tint is applied to all the images of that button.
  • buttonIndex must be between 1 and the number of buttons; otherwise the not a valid ButtonIndex error is raised. Fractions are dropped.
  • Unlike the other ActionButtonGroup functions, the does not exist message ends with a full stop.
  • The function also has a No window specified. error, but it never triggers: a missing name is treated as an empty string, which gives the does not exist error instead.

Errors

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

Example

Greying out slots, from ea_guildvaultwindow/source/guildvaultwindow.lua:

ActionButtonGroupSetTintColor("GuildVaultWindowSlots", i, 128, 128, 128)
...
ActionButtonGroupSetTintColor("GuildVaultWindowSlots", i, 255, 255, 255)

See also