2015-01-21 11:43:58 +00:00
|
|
|
/**
|
|
|
|
* fnc_saveToProfile.sqf
|
|
|
|
* @Descr: Save the clientside option to the profile.
|
|
|
|
* @Author: Glowbal
|
|
|
|
*
|
|
|
|
* @Arguments: [name STRING (Name of setting)]
|
|
|
|
* @Return: BOOL True if saved.
|
|
|
|
* @PublicAPI: false
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
private ["_nameSelected", "_saved"];
|
|
|
|
PARAMS_2(_type,_name);
|
|
|
|
|
2015-01-21 22:27:53 +00:00
|
|
|
_saved = false;
|
2015-01-21 11:43:58 +00:00
|
|
|
switch (_type) do {
|
|
|
|
case (MENU_TAB_OPTIONS): {
|
2015-01-21 22:27:53 +00:00
|
|
|
{
|
|
|
|
_nameSelected = _x select 0;
|
|
|
|
if (_nameSelected == _name) exitwith {
|
|
|
|
profileNamespace setvariable [(format ["ace_option_%1", _name]), (_x select 4)];
|
|
|
|
_saved = true;
|
|
|
|
};
|
|
|
|
}foreach GVAR(clientSideOptions);
|
|
|
|
};
|
2015-01-21 11:43:58 +00:00
|
|
|
case (MENU_TAB_COLORS): {
|
2015-01-21 22:27:53 +00:00
|
|
|
{
|
|
|
|
_nameSelected = _x select 0;
|
|
|
|
if (_nameSelected == _name) exitwith {
|
|
|
|
profileNamespace setvariable [(format ["ace_color_%1", _name]), (_x select 3)];
|
|
|
|
_saved = true;
|
|
|
|
};
|
|
|
|
}foreach GVAR(clientSideColors);
|
|
|
|
};
|
2015-01-21 11:43:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
_saved
|