API:ComboBoxGetSelectedMenuItem
From RoR Wiki
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.0when nothing is selected.
Details
- Items are numbered in the order they were added with ComboBoxAddMenuItem.
Errors
The error messages use the name ComboGetSelectedMenuItem:
Error in function call 'ComboGetSelectedMenuItem': Window %s does not existError 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" )
