Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:ButtonSetHighlightFlag

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)

UI Lua API · Button functions
Version: WAR 1.4.8

Sets or clears the highlight state of a Button.

ButtonSetHighlightFlag(buttonName, highlight)

Arguments

buttonName
string – Name of a Button window.
highlight
boolean – true to highlight the button, false to remove the highlight.

Returns

Nothing.

Details

  • The client sets and clears the same flag when the mouse pointer moves onto or off the button, so a value set from Lua is replaced the next time that happens.
  • The button's text colour changes to the colour set for its new state (see ButtonSetTextColor).
  • The stock UI never calls ButtonSetHighlightFlag.
  • highlight must be a real boolean. Passing nil or a number raises an Invalid Parameters error.
  • The function needs at least two arguments and only reads the last two.

Errors

  • Error in function call 'ButtonSetHighlightFlag': Window %s does not exist
  • Error in function call 'ButtonSetHighlightFlag': Window %s is not a Button

Example

A minimal example built from the signature above:

ButtonSetHighlightFlag( "MyButton", true )

See also