-
Notifications
You must be signed in to change notification settings - Fork 1
Settings Object
The global Controller()
object and each controller instance get an instance of GC_Settings()
stored in their globalSettings
and settings
attributes, respectively.
Individual ettings can be accessed and updated directly as attributes of the globalSettings
or settings
attribute1.
→ Read about the available settings.
// Global
console.log(Controller.globalSettings.useAnalogAsDpad);
>> "none"
Controller.globalSettings.useAnalogAsDpad = "both";
console.log(Controller.globalSettings.useAnalogAsDpad);
>> "both"
// Per-controller
var controller = Controller.getController(0);
console.log(controller.settings.useAnalogAsDpad);
>> "none"
controller.settings.useAnalogAsDpad = "left";
console.log(controller.settings.useAnalogAsDpad);
>> "left"
1 If the setting you're updating is an array of key/value pairs, you can update a subset of them directly.
….analogStickDeadzones = {min: 0.2, max: 1};
….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