ACE3/addons/optionsmenu/functions/fnc_resetSettings.sqf

31 lines
661 B
Plaintext
Raw Normal View History

/**
* fnc_resetSettings.sqf
* @Descr:
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: true
*/
#include "script_component.hpp"
2015-01-21 22:27:53 +00:00
private ["_name", "_default", "_lastSelected"];
2015-01-21 19:53:05 +00:00
{
2015-01-21 22:27:53 +00:00
_name = _x select 0;
_default = _x select 7;
2015-01-21 22:27:53 +00:00
[MENU_TAB_OPTIONS, _name, _default] call FUNC(updateSetting);
} forEach GVAR(clientSideOptions);
2015-01-21 19:53:05 +00:00
{
2015-01-21 22:27:53 +00:00
_name = _x select 0;
_default = _x select 7;
2015-01-21 22:27:53 +00:00
[MENU_TAB_COLORS, _name, _default] call FUNC(updateSetting);
2015-01-21 19:53:05 +00:00
} forEach GVAR(clientSideColors);
_lastSelected = lbCurSel 200;
[GVAR(optionMenu_openTab)] call FUNC(onListBoxShowSelectionChanged);
if (_lastSelected != -1) then {
2015-01-21 22:27:53 +00:00
lbSetCurSel [200, _lastSelected];
};