Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:ComboBoxGetSelectedMenuItem

From RoR Wiki
Revision as of 19:41, 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 · ComboBox functions
Version: WAR 1.4.8

Returns the number of the selected item of a ComboBox.

index = ComboBoxGetSelectedMenuItem(comboBoxName)

Arguments

comboBoxName
string – Name of the ComboBox.

Returns

index
number – Number of the selected item, counted from 1. 0 when nothing is selected.

Details

Errors

The error messages use the name ComboGetSelectedMenuItem:

  • Error in function call 'ComboGetSelectedMenuItem': Window %s does not exist
  • Error in function call 'ComboGetSelectedMenuItem': Window %s is not a ComboBoxCast

Example

From default/ea_settingswindow/source/settingswindowtabgeneral.lua:

SystemData.Settings.GamePlay.combatLighting = ComboBoxGetSelectedMenuItem( SettingsWindowTabGeneral.contentsName.."SettingsGamePlayCombatLightingCombo" )

See also