Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:ButtonSetDisabledFlag

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

Disables or enables a Button.

ButtonSetDisabledFlag(buttonName, disabled)

Arguments

buttonName
string – Name of a Button window.
disabled
boolean – true to disable the button, false to enable it.

Returns

Nothing.

Details

  • A disabled button is drawn in its disabled state (Button.ButtonState.DISABLED or DISABLED_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).
  • disabled 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 'ButtonSetDisabledFlag': Window %s does not exist
  • Error in function call 'ButtonSetDisabledFlag': Window %s is not a Button

Example

From ea_interactionwindow/source/interactionwindowlibrarian.lua:

ButtonSetDisabledFlag( "EA_Window_InteractionLibrarianStoreFilterByUsableButton", not isFilterable )

See also