Skip to content

settings.update()

jackcarey edited this page Jul 16, 2022 · 1 revision

Changes the value of one or more settings.

Arguments

.update(setting, value)

Argument Type Description
setting String The [[setting
value varies1 New value of setting.

Examples

// Global
Controller.globalSettings.update('useAnalogAsDpad', 'both');
// Per-controller
Controller.getController(0).settings.update('useAnalogAsDpad', 'left');

.update(settingList)

Argument Type Description
settingList Object A list of setting/value1 pairs to be updated.

Examples

// Global
Controller.globalSettings.update({
    useAnalogAsDpad: 'both',
    analogStickDpadThreshold: 0.9
});
// Per-controller
Controller.getController(0).settings.update({
    useAnalogAsDpad: 'left',
    analogStickDpadThreshold: 0.3
});
Notes:

1 If the setting you're updating takes an array of key/value pairs, you can choose to only pass a subset of those keys.

.update('analogStickDeadzones', {min: 0.2, max: 1});
.update('analogStickDeadzones', {min: 0.2});
Clone this wiki locally