IntSetting

An integer setting.

Example

const delay = new IntSetting("Delay", "The amount of ticks to wait in between attacks.", false);

Extends

Constructors

Constructor

new IntSetting(owner, name, description, defaultValue, min, max): IntSetting

Parameters

owner

object

Can either be 'script' or a subgroup.

name

string

The name of the setting.

description

string

The description of the setting.

defaultValue

number

The default value of the setting.

min

number

The minimum value of the setting.

max

number

The maximum value of the setting.

Returns

IntSetting

Overrides

Setting.constructor

Constructor

new IntSetting(owner, name, description, defaultValue, min, max, step): IntSetting

Parameters

owner

object

Can either be 'script' or a subgroup.

name

string

The name of the setting.

description

string

The description of the setting.

defaultValue

number

The default value of the setting.

min

number

The minimum value of the setting.

max

number

The maximum value of the setting.

step

number

The amount to round the setting by when adjusting via the slider.

Returns

IntSetting

Overrides

Setting.constructor

Methods

description()

description(): string

Returns

string

The description of the setting.

Inherited from

Setting.description


getValue()

getValue(): number

Returns

number

The value of the setting.


name()

name(): string

Returns

string

The name of the setting.

Inherited from

Setting.name


setValue()

setValue(value): void

Parameters

value

number

The value 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

The function to determine if the setting should be visible or not.

Returns

void

Example

Inherited from

Setting.visible

Last updated