ACE3/addons/optionsmenu/functions/fnc_resetSettings.sqf

38 lines
769 B
Plaintext
Raw Normal View History

/*
* Author: Glowbal
* Resets all settings to default.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* [] call ACE_optionsmenu_fnc_onListBoxSettingsChanged
*
* Public: No
*/
#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-03-06 18:57:45 +00:00
_name = _x select 0;
_default = _x select 7;
[MENU_TAB_OPTIONS, _name, _default] call FUNC(updateSetting);
2015-01-21 22:27:53 +00:00
} forEach GVAR(clientSideOptions);
2015-01-21 19:53:05 +00:00
{
2015-03-06 18:57:45 +00:00
_name = _x select 0;
_default = _x select 7;
[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-03-06 18:57:45 +00:00
lbSetCurSel [200, _lastSelected];
};