Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:ButtonGetCheckButtonFlag

From RoR Wiki

UI Lua API · Button functions
Version: WAR 1.4.8

Returns whether a Button behaves as a check button.

isCheckButton = ButtonGetCheckButtonFlag(buttonName)

Arguments

buttonName
string – Name of a Button window.

Returns

isCheckButton
boolean – true if the button's check-button flag is set.

Details

  • The flag is set with ButtonSetCheckButtonFlag. See that page for its effect.
  • To find out whether a check button is checked, use ButtonGetPressedFlag.
  • The not a Button error message names ButtonGetStayDownFlag instead of ButtonGetCheckButtonFlag.
  • The stock UI never calls ButtonGetCheckButtonFlag.

Errors

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

Example

A minimal example built from the signature above:

if( ButtonGetCheckButtonFlag( "MyButton" ) ) then
    local checked = ButtonGetPressedFlag( "MyButton" )
end

See also