ModeSetting

A setting that can have a select few modes as values

new ModeSetting(String name, String description, String value, String[] possibleValues)

Creates a new ModeSetting. A ModeSetting is a setting with a set of possible modes that the user will be abled to select from.

//example of how to create a ModeSetting correctly

breeze.registerModule("TestModule", "This module has a mode setting!", {
    'mode': new ModeSetting("PoopMode", "The mode to use", "DEFAULT", ["DEFAULT", "FAST", "PACKET", "DISABLE"]),
    
    'enable': function() {
        if (this.mode.is("DISABLE")) {
            this.module.disable()
        } else {
             breeze.log(this.mode.getValue())
        }
    }
})

getValue(): String

Returns the current value of the setting.

setValue(String value): void

Sets the value of the setting.

getName(): String

Gives the name of the setting.

getDescription(): String

Returns the description of the setting.

is(String value): boolean

Returns if value is the currently selected mode.

setHidden(boolean hidden): void

Allows you to hide a setting from the menu.

setHidden() only works on settings that have been initiated by scripts in the first place!

isHidden(boolean hidden): void

Allows you to hide a setting from the menu.

Last updated