API:ButtonSetDisabledFlag
From RoR Wiki
UI Lua API · Button functions
Version: WAR 1.4.8
Disables or enables a Button.
ButtonSetDisabledFlag(buttonName, disabled)
Arguments
- buttonName
string– Name of a Button window.- disabled
boolean–trueto disable the button,falseto enable it.
Returns
Nothing.
Details
- A disabled button is drawn in its disabled state (
Button.ButtonState.DISABLEDorDISABLED_PRESSED), and clicks on it do not change its pressed flag. - The button's text colour changes to the colour set for its new state (see ButtonSetTextColor).
disabledmust 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 'ButtonSetDisabledFlag': Window %s does not existError in function call 'ButtonSetDisabledFlag': Window %s is not a Button
Example
From ea_interactionwindow/source/interactionwindowlibrarian.lua:
ButtonSetDisabledFlag( "EA_Window_InteractionLibrarianStoreFilterByUsableButton", not isFilterable )
