Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:ComboBoxSetDisabledFlag

From RoR Wiki

UI Lua API · ComboBox functions
Version: WAR 1.4.8

Enables or disables a ComboBox.

ComboBoxSetDisabledFlag(comboBoxName, disabled)

Arguments

comboBoxName
string – Name of the ComboBox.
disabled
boolean – true to disable the ComboBox, false to enable it.

Returns

Nothing.

Details

  • The flag is also applied to the ComboBox's selected-item button and to every menu item button.
  • A disabled ComboBox does not open its menu, also not through ComboBoxExternalOpenMenu.
  • A menu that is already open is not closed by this call.
  • 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. Any extra arguments placed in front of them are ignored.

Errors

  • Error in function call 'ComboBoxSetDisabledFlag': Window %s does not exist
  • Error in function call 'ComboBoxSetDisabledFlag': Window %s is not a ComboBox

Example

From default/ea_openpartywindow/source/openpartywindowtabmanage.lua:

ComboBoxSetDisabledFlag( PARENT_WINDOW.."LootModeCombo", GameData.Player.isGroupLeader == false )

See also