API:ButtonSetHighlightFlag
From RoR Wiki
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–trueto highlight the button,falseto 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. highlightmust be a real boolean. Passingnilor 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 existError in function call 'ButtonSetHighlightFlag': Window %s is not a Button
Example
A minimal example built from the signature above:
ButtonSetHighlightFlag( "MyButton", true )
