2015-03-06 17:15:32 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
2015-03-14 18:10:25 +00:00
|
|
|
* Called from the onLoad of ACE_settingsMenu dialog.
|
2015-03-06 17:15:32 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2015-03-14 18:10:25 +00:00
|
|
|
* None
|
2015-03-06 17:15:32 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2015-03-14 18:10:25 +00:00
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [onLoadEvent] call ACE_optionsmenu_fnc_onSettingsMenuOpen
|
2015-03-06 17:15:32 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2015-01-21 11:43:58 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-04-17 00:46:42 +00:00
|
|
|
private ["_setting", "_menu"];
|
|
|
|
|
2015-02-03 03:44:34 +00:00
|
|
|
// Filter only user setable setting
|
|
|
|
GVAR(clientSideOptions) = [];
|
|
|
|
GVAR(clientSideColors) = [];
|
2015-04-17 00:46:42 +00:00
|
|
|
|
2015-02-03 03:44:34 +00:00
|
|
|
{
|
2015-03-06 17:15:32 +00:00
|
|
|
// 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));
|
2015-02-03 03:44:34 +00:00
|
|
|
|
2015-03-06 17:15:32 +00:00
|
|
|
// 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;
|
|
|
|
};
|
|
|
|
};
|
2015-02-03 03:44:34 +00:00
|
|
|
} 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);
|
2015-03-06 18:56:15 +00:00
|
|
|
|
|
|
|
disableSerialization;
|
|
|
|
_menu = uiNamespace getvariable "ACE_settingsMenu";
|
|
|
|
(_menu displayCtrl 1002) ctrlEnable false;
|
|
|
|
(_menu displayCtrl 1003) ctrlEnable false;
|
2015-04-05 00:17:43 +00:00
|
|
|
|
|
|
|
if (GVAR(serverConfigGeneration) == 0) then {
|
|
|
|
(_menu displayCtrl 1102) ctrlEnable false;
|
|
|
|
(_menu displayCtrl 1102) ctrlShow false;
|
|
|
|
};
|
2015-08-07 19:14:45 +00:00
|
|
|
|
2015-08-08 11:07:22 +00:00
|
|
|
lbClear (_menu displayCtrl 14);
|
2015-08-07 19:14:45 +00:00
|
|
|
{
|
|
|
|
if (_x == "") then {
|
2015-08-08 09:52:23 +00:00
|
|
|
_x = localize "STR_ACE_OptionsMenu_category_all";
|
2015-08-07 19:14:45 +00:00
|
|
|
};
|
2015-08-08 11:07:22 +00:00
|
|
|
if (isLocalized _x) then {_x = localize _x};
|
|
|
|
(_menu displayCtrl 14) lbAdd _x;
|
2015-08-07 19:14:45 +00:00
|
|
|
} forEach GVAR(categories);
|
2015-08-07 20:08:52 +00:00
|
|
|
|
2015-08-08 11:07:22 +00:00
|
|
|
(_menu displayCtrl 14) lbSetCurSel GVAR(currentCategorySelection); //All Catagoies
|
2015-08-07 20:08:52 +00:00
|
|
|
|
|
|
|
|