ACE3/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf
Glowbal 4f08d0d006 Merge branch 'master' into SettingsMenuImprovements
Conflicts:
	addons/optionsmenu/functions/fnc_onListBoxSettingsChanged.sqf
	addons/optionsmenu/functions/fnc_onListBoxShowSelectionChanged.sqf
	addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf
	addons/optionsmenu/functions/fnc_onSliderPosChanged.sqf
	addons/optionsmenu/functions/fnc_resetSettings.sqf
	addons/optionsmenu/functions/fnc_settingsMenuUpdateKeyView.sqf
	addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf
	addons/optionsmenu/functions/fnc_updateSetting.sqf
	addons/optionsmenu/gui/settingsMenu.hpp
2015-03-15 00:46:14 +01:00

48 lines
1.3 KiB
Plaintext

/*
* Author: Glowbal
* Called from the onLoad of ACE_settingsMenu dialog.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* [onLoadEvent] call ACE_optionsmenu_fnc_onSettingsMenuOpen
*
* Public: No
*/
#include "script_component.hpp"
// Filter only user setable setting
GVAR(clientSideOptions) = [];
GVAR(clientSideColors) = [];
{
// If the setting is user setable and not forced
if ((_x select 2) && !(_x select 6)) then {
// 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);
//Delay a frame
[{ [MENU_TAB_OPTIONS] call FUNC(onListBoxShowSelectionChanged) }, []] call EFUNC(common,execNextFrame);
private "_menu";
disableSerialization;
_menu = uiNamespace getvariable "ACE_settingsMenu";
(_menu displayCtrl 1002) ctrlEnable false;
(_menu displayCtrl 1003) ctrlEnable false;