Class BpxGamepadTypeDetector

A class used to detect the BpxGamepadType of a given Gamepad. It's used by BeetPx internals to decide which gamepad mapping to use, but you might also want to use it for in your game if needed (e.g. to decide which sprite of the gamepad button to show on the controls screen).

window.addEventListener("gamepadconnected", (gamepadEvent) => {
$x.logDebug(`Connected: ${BpxGamepadTypeDetector.detect(gamepadEvent.gamepad))}`);
});

Static methods

Static methods