2015-01-21 11:43:58 +00:00
|
|
|
/**
|
|
|
|
* fnc_onSettingsMenuOpen.sqf
|
|
|
|
* @Descr: called when the settings or configuration menu has opened. Do not use anywhere else.
|
|
|
|
* @Author: Glowbal
|
|
|
|
*
|
|
|
|
* @Arguments: []
|
|
|
|
* @Return:
|
|
|
|
* @PublicAPI: false
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-02-03 03:44:34 +00:00
|
|
|
// Filter only user setable setting
|
|
|
|
GVAR(clientSideOptions) = [];
|
|
|
|
GVAR(clientSideColors) = [];
|
|
|
|
{
|
2015-02-03 05:37:13 +00:00
|
|
|
// If the setting is user setable and not forced
|
|
|
|
if ((_x select 2) && !(_x select 6)) then {
|
2015-02-03 03:44:34 +00:00
|
|
|
// Append the current value to the setting metadata
|
|
|
|
_setting = + _x;
|
|
|
|
_setting pushBack (missionNamespace getVariable (_x select 0));
|
|
|
|
|
|
|
|
// Categorize the setting according to types
|
|
|
|
// @todo: allow the user to modify other types of parameters?
|
|
|
|
if ((_x select 1) == "SCALAR" || (_x select 1) == "BOOL") then {
|
|
|
|
GVAR(clientSideOptions) pushBack _setting;
|
|
|
|
};
|
|
|
|
if ((_x select 1) == "COLOR") then {
|
|
|
|
GVAR(clientSideColors) pushBack _setting;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
} forEach EGVAR(common,settings);
|
|
|
|
|
2015-01-21 23:29:42 +00:00
|
|
|
//Delay a frame
|
|
|
|
[{ [MENU_TAB_OPTIONS] call FUNC(onListBoxShowSelectionChanged) }, []] call EFUNC(common,execNextFrame);
|