Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:LabelSetLinkColor

From RoR Wiki

UI Lua API · Label functions
Version: WAR 1.4.8

Sets the colour used for hyperlinks in a Label's text.

LabelSetLinkColor(labelName, r, g, b)

Arguments

labelName
string – Name of a Label window.
r, g, b
number – Red, green and blue on a 0–255 scale.

Returns

Nothing.

Details

  • Each component is converted to a whole number by dropping the fractional part, then divided by 255. Alpha is always set to fully opaque.
  • The label's text is laid out again after the colour is stored.
  • The client function that reads this colour back is registered as _LabelGetLinkColor. The addon-facing LabelGetLinkColor returns the text colour instead.
  • The stock UI never calls LabelSetLinkColor.

Errors

  • Error in function call 'LabelSetLinkColor': Window %s does not exist
  • Error in function call 'LabelSetLinkColor': Window %s is not a Label

Example

A minimal example built from the signature above:

LabelSetLinkColor( "MyLabel", 255, 204, 0 )
local r, g, b = _LabelGetLinkColor( "MyLabel" )

See also