Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 12
Module Values
SenkJu edited this page Sep 1, 2019
·
1 revision
Values will be visible in the ClickGUI and can be changed by the user. If a module is using settings instead of hard-coded values, it is more customizable for the user.
// Values must be registered manuellythis.addValues=function(values){values.add(myValue1);values.add(myValue2);}// BoolValue - Either true or falsevarmyBoolValue=value.createBoolean(valueName,defaultValue);// BlockValue - Used for selecting a blockvarmyBlockValue=value.createBlock(valueName,defaultBlockId);// FloatValue - Slider allowing the user to select a floating-point numbervarmyFloatValue=value.createFloat(valueName,defaultValue,minValue,maxValue);// IntegerValues - Slider allowing the user to select an integer numbervarmyIntValue=value.createInteger(valueName,defaultValue,minValue,maxValue);// ListValue - Allowing the user to select one item from the list of available valuesvarmyList=value.createList(valueName,[possibleValue1,possibleValue2,possibleValue3],defaultValue);// TextValue - Allowing the user to specify any string as its valuevarmyTextValue=value.createText(valueName,defaultValue);// BoolValue - Either true or falsevarmyBoolValue=value.createBoolean("MyBoolValue",true);myBoolValue.get();// truemyBoolValue.set(false);// Sets value to false