ModeSetting
A mode setting.
Extends
Constructors
Constructor
new ModeSetting(
owner,name,description,defaultValue,values):ModeSetting
Parameters
owner
object
owner - Can either be 'script' or a subgroup.
name
string
name - The name of the setting.
description
string
description - The description of the setting.
defaultValue
string
defaultValue - The default mode of the setting.
values
string[]
values - An array of possible mode for the setting.
Returns
ModeSetting
Overrides
Setting.constructor
Methods
description()
description():
string
Returns
string
The description of the setting.
Overrides
getValue()
getValue():
string
Returns
string
The name of the currently selected mode.
is()
is(
mode):boolean
Check if the requested mode is the current one.
Parameters
mode
string
mode - The mode you want to check.
Returns
boolean
True if the mode is currently selected
name()
name():
string
Returns
string
The name of the setting.
Overrides
setValue()
setValue(
mode):void
Parameters
mode
string
mode - The mode you want to set the setting to.
Returns
void
visible()
visible(
visible):void
You can use this to hide settings temporarily depending on the user config. The callback should return a boolean.
Parameters
visible
Function
visible - The function to determine if the setting should be visible or not.
Returns
void
Example
Inherited from
Last updated