Add support for custom slider settings using ace_settings config (#5750)

This commit is contained in:
PabstMirror 2017-11-13 03:27:09 -06:00 committed by ulteq
parent 39c56447d9
commit d1f6b0a9d8
2 changed files with 7 additions and 1 deletions

View File

@ -58,7 +58,12 @@ case ("SCALAR"): { // ACE's Scalar can be a float or an index for a list
_cbaValueInfo = [_values, _valueTitles, getNumber (_config >> "value")];
} else {
_cbaSettingType = "SLIDER"; // [_min, _max, _default, _trailingDecimals]
_cbaValueInfo = [-1, 5000, getNumber (_config >> "value"), 1];
_cbaValueInfo = if (isArray (_config >> "sliderSettings")) then {
getArray (_config >> "sliderSettings");
} else {
[-1, 5000, 0, 1]
};
_cbaValueInfo set [2, getNumber (_config >> "value")];
};
};
case ("BOOL"): {

View File

@ -10,6 +10,7 @@ class ACE_Settings {
description = CSTRING(updateInterval_Description);
typeName = "SCALAR";
value = 60;
sliderSettings[] = {0, 300, 0, 0};
};
class GVAR(windSimulation) {
displayName = CSTRING(windSimulation_DisplayName);