API:ButtonGetHighlightFlag
From RoR Wiki
UI Lua API · Button functions
Version: WAR 1.4.8
Returns whether a Button is highlighted.
highlighted = ButtonGetHighlightFlag(buttonName)
Arguments
- buttonName
string– Name of a Button window.
Returns
- highlighted
boolean–trueif the button's highlight flag is set.
Details
- The client sets the highlight flag when the mouse pointer moves onto the button and clears it when the pointer leaves. ButtonSetHighlightFlag sets it from Lua.
- The stock UI never calls
ButtonGetHighlightFlag.
Errors
Error in function call 'ButtonGetHighlightFlag': Window %s does not existError in function call 'ButtonGetHighlightFlag': Window %s is not a Button
Example
A minimal example built from the signature above:
if( ButtonGetHighlightFlag( "MyButton" ) ) then
-- the mouse is over MyButton
end
