Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
commy2 committed Jun 3, 2016
1 parent 825de19 commit a5dd8ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions addons/settings/CBA_Settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"; };*/
};
};
8 changes: 6 additions & 2 deletions addons/settings/fnc_create.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ params [
["_settingType", "", [""]],
["_title", [], ["", []]],
["_valueInfo", []],
["_enabledFor", nil, [[]]],
["_script", {}, [{}]]
];
_title params [["_displayName", nil, [""]], ["_tooltip", "", [""]]];
Expand All @@ -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"): {
Expand Down Expand Up @@ -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 {};
};
Expand Down

0 comments on commit a5dd8ae

Please sign in to comment.