diff --git a/addons/settings/CBA_Settings.hpp b/addons/settings/CBA_Settings.hpp index 1d9ffe72c..c2149eeca 100644 --- a/addons/settings/CBA_Settings.hpp +++ b/addons/settings/CBA_Settings.hpp @@ -49,11 +49,11 @@ class CBA_Setting_Color_Alpha_base: CBA_Setting_Color_base { class CBA_Settings { class CBA { - displayName = "CBA"; + /*displayName = "CBA"; class CBA_TEST1: CBA_Setting_List_base {}; class CBA_TEST2: CBA_Setting_Boolean_base {}; class CBA_TEST3: CBA_Setting_Slider_base {}; class CBA_TEST_C: CBA_Setting_Color_base { displayName = "Test Setting Color"; }; - class CBA_TEST_A: CBA_Setting_Color_Alpha_base { displayName = "Test Setting Color Alpha"; }; + class CBA_TEST_A: CBA_Setting_Color_Alpha_base { displayName = "Test Setting Color Alpha"; };*/ }; }; diff --git a/addons/settings/fnc_create.sqf b/addons/settings/fnc_create.sqf index ace681f6c..29cda7b1d 100644 --- a/addons/settings/fnc_create.sqf +++ b/addons/settings/fnc_create.sqf @@ -50,6 +50,7 @@ params [ ["_settingType", "", [""]], ["_title", [], ["", []]], ["_valueInfo", []], + ["_enabledFor", nil, [[]]], ["_script", {}, [{}]] ]; _title params [["_displayName", nil, [""]], ["_tooltip", "", [""]]]; @@ -60,11 +61,14 @@ if (_displayName isEqualTo "") then { _displayName = _setting; }; +if (isNil "_enabledFor") then { + _enabledFor = ["client", "server", "mission"]; +}; + private "_defaultValue"; private _values = []; private _labels = []; private _trailingDecimals = 0; -private _enabledFor = ["client", "server", "mission"]; switch (toUpper _settingType) do { case ("BOOLEAN"): { @@ -99,7 +103,7 @@ switch (toUpper _settingType) do { _values = [_min, _max]; }; case ("COLOR"): { - _defaultValue = [_valueInfo] param [0, [1,1,1], [[]], [2,3]]; + _defaultValue = [_valueInfo] param [0, [1,1,1], [[]], [3,4]]; }; default {}; };