Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:ButtonGetDisabledFlag

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

Returns whether a Button is disabled.

disabled = ButtonGetDisabledFlag(buttonName)

Arguments

buttonName
string – Name of a Button window.

Returns

disabled
boolean – true if the button is disabled.

Details

  • The flag is set with ButtonSetDisabledFlag.
  • A disabled button is drawn in its disabled state, and clicks on it do not change its pressed flag.

Errors

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

Example

Ignoring clicks on a disabled button, from ea_backpackwindow/source/backpacklistview.lua:

if ButtonGetDisabledFlag( SystemData.ActiveWindow.name.."Button" ) then
    return
end

See also