2015-03-06 17:15:32 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
2015-03-14 18:10:25 +00:00
|
|
|
* Called when the listbox selection is changed for an options (eg: chaning a setting from false to true)
|
2015-03-06 17:15:32 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2015-03-14 18:10:25 +00:00
|
|
|
* None
|
2015-03-06 17:15:32 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2015-03-14 18:10:25 +00:00
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [] call ACE_optionsmenu_fnc_onListBoxSettingsChanged
|
2015-03-06 17:15:32 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2015-01-21 11:43:58 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-11 09:15:55 +00:00
|
|
|
private ["_settingIndex", "_rightDropDownIndex"];
|
2015-01-21 11:43:58 +00:00
|
|
|
|
2015-01-21 19:53:05 +00:00
|
|
|
_rightDropDownIndex = lbCurSel 400; //Index of right drop down
|
|
|
|
if (_rightDropDownIndex < 0) then {_rightDropDownIndex = 0;};
|
2015-01-21 11:43:58 +00:00
|
|
|
|
2015-08-10 22:19:30 +00:00
|
|
|
_settingIndex = -1;
|
2015-08-11 09:15:55 +00:00
|
|
|
if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then {
|
|
|
|
_settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]];
|
2015-08-10 22:19:30 +00:00
|
|
|
};
|
|
|
|
if (_settingIndex == -1) exitWith {};
|
|
|
|
|
2015-01-21 11:43:58 +00:00
|
|
|
switch (GVAR(optionMenu_openTab)) do {
|
2015-04-05 00:33:45 +00:00
|
|
|
case (MENU_TAB_OPTIONS): {
|
|
|
|
if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(clientSideOptions)))) then {
|
2015-08-10 22:19:30 +00:00
|
|
|
_settingIndex = (GVAR(clientSideOptions) select _settingIndex) select 0;
|
|
|
|
[MENU_TAB_OPTIONS, _settingIndex, _rightDropDownIndex] call FUNC(updateSetting);
|
2015-04-05 00:33:45 +00:00
|
|
|
};
|
|
|
|
[false] call FUNC(settingsMenuUpdateList);
|
2015-08-10 22:19:30 +00:00
|
|
|
};
|
2015-04-05 00:33:45 +00:00
|
|
|
case (MENU_TAB_SERVER_OPTIONS): {
|
|
|
|
if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(serverSideOptions)))) then {
|
2015-08-10 22:19:30 +00:00
|
|
|
_settingIndex = (GVAR(serverSideOptions) select _settingIndex) select 0;
|
|
|
|
[MENU_TAB_SERVER_OPTIONS, _settingIndex, _rightDropDownIndex] call FUNC(updateSetting);
|
2015-04-05 00:33:45 +00:00
|
|
|
};
|
|
|
|
[false] call FUNC(serverSettingsMenuUpdateList);
|
2015-08-10 22:19:30 +00:00
|
|
|
};
|
2015-01-21 11:43:58 +00:00
|
|
|
};
|