Settings
Global Functions
getName
Returns the name of the setting as a String
addParent
Allows you to add a condition for the setting to show in the clickgui
Number Setting
script.numberSetting(...
will return a number setting that allows for the following functions:
Function
Description
getValue()
Returns the current value of the setting as a Double.
getMinValue()
Returns the min value of the setting as a Number.
getMaxValue()
Returns the max value of the setting as a Number.
getIncrement()
Returns the increment of the setting as a Number
setValue(newValue)
Sets a new current value of the setting.
The getValue()
function returns a Double. The Double object allows for all sorts of different data types pertaining to numbers.
You will be able to do the following functions:
getValue().floatValue()
getValue().intValue()
getValue().doubleValue()
getValue().longValue()
Boolean Setting
script.booleanSetting(...
will return a boolean setting that allows for the following functions:
Function
Description
isEnabled()
Returns the setting's state as a boolean.
toggle()
Changes the current state of the setting to the opposite. i.e true turns to false and false turns to true.
setState(state)
Sets the current state of the boolean setting to the new state.
Mode Setting
Modes Input
script.modeSetting(...
will return a mode setting that allows for the following functions:
Function
Description
setCurrentMode(mode)
Sets the current mode (Parameter is a String)
is(mode)
Returns True if the current mode is equal to the specified mode in the parameter
getMode()
Returns the current mode as a String
Color Setting
How to create a Color object
script.colorSetting(...
will return a color setting that allows for the following functions:
Function
Description
getColor()
Returns the java.awt.Color
object (This allows for other functions such as getRGB()
, geRed()
, getBlue()
, getGreen()
, and more)
getHue()
Returns the hue of the current color as a Number.
getSaturation()
Returns the saturation of the current color as a Number.
isRainbow()
Returns True if the color setting is now a rainbow
setRainbow(set)
Sets the color setting to a rainbow if the parameter is true, sets the color setting back to a regular color picker if false
getRainbow()
getBrightness()
Returns the brightness of the current color as a Number.
String Setting
script.stringSetting(...
will return a number setting that allows for the following functions:
Function
Description
getString()
Returns the current String in the text box
setString(newString)
Sets the current typed String to the new string parameter
Multi-Boolean Setting
script.multiBoolSetting(...
will return a number setting that allows for the following functions:
Function
Description
getSetting(name)
Returns the sub boolean setting with the specified name
isEnabled(name)
Returns True if the specified boolean setting with that name is enabled
Last updated