-
Notifications
You must be signed in to change notification settings - Fork 1
settings.update()
jackcarey edited this page Jul 16, 2022
·
1 revision
Changes the value of one or more settings.
Argument | Type | Description |
---|---|---|
setting |
String |
The [[setting |
value |
varies1 | New value of setting. |
// Global
Controller.globalSettings.update('useAnalogAsDpad', 'both');
// Per-controller
Controller.getController(0).settings.update('useAnalogAsDpad', 'left');
Argument | Type | Description |
---|---|---|
settingList |
Object |
A list of setting /value 1 pairs to be updated. |
// Global
Controller.globalSettings.update({
useAnalogAsDpad: 'both',
analogStickDpadThreshold: 0.9
});
// Per-controller
Controller.getController(0).settings.update({
useAnalogAsDpad: 'left',
analogStickDpadThreshold: 0.3
});
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});
The MIT License (MIT)
Copyright © 2022 Jack Carey
Setup
Buttons & Analog Sticks
Controller Layouts
Configuring Settings
Controller Events
Button Events
Analog Stick Events
Controller.supported
Controller.controllers
Controller.controllerCount
Controller.search()
Controller.getController()
Controller.watchAll()
Controller.unwatchAll()
.connectedTimestamp
.id
.index
.inputs
.layoutInfo
.name
.watch()
.unwatch()
Settings Objects
List of Settings
settings.list()
settings.clear()
settings.update()
→ Grunt Tasks
→ Registering Settings
→ Creating Layout Maps