Skip to content

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 ​

ParameterTypeDescription
callbackGamepadConnectionEventHandlerHandler to run with gamepad connection data when a controller connects.

Returns ​

void

Example ​