textmode.js / Textmodifier / gamepadConnected
Method: gamepadConnected()
ts
gamepadConnected(callback): void;Register the single-callback handler for gamepad connection events.
This is a legacy-style single-callback shortcut for the 'gamepadConnected' event. Calling it replaces the previous callback registered through this same method while leaving any listeners added via Textmodifier.on untouched.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | GamepadConnectionEventHandler | Handler to run with gamepad connection data when a controller connects. |
Returns
void