mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-07 16:55:51 +00:00
disable the gamepad support when the option is on OFF
This commit is contained in:
parent
e4b8bffdec
commit
3ee9c39975
@ -132,6 +132,7 @@ export class InputsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
gamepadButtonDown(pad: Phaser.Input.Gamepad.Gamepad, button: Phaser.Input.Gamepad.Button, value: number): void {
|
gamepadButtonDown(pad: Phaser.Input.Gamepad.Gamepad, button: Phaser.Input.Gamepad.Button, value: number): void {
|
||||||
|
if (!this.scene.gamepadSupport) return;
|
||||||
const actionMapping = this.getActionGamepadMapping();
|
const actionMapping = this.getActionGamepadMapping();
|
||||||
const buttonDown = actionMapping.hasOwnProperty(button.index) && actionMapping[button.index];
|
const buttonDown = actionMapping.hasOwnProperty(button.index) && actionMapping[button.index];
|
||||||
if (buttonDown !== undefined) {
|
if (buttonDown !== undefined) {
|
||||||
@ -144,6 +145,7 @@ export class InputsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
gamepadButtonUp(pad: Phaser.Input.Gamepad.Gamepad, button: Phaser.Input.Gamepad.Button, value: number): void {
|
gamepadButtonUp(pad: Phaser.Input.Gamepad.Gamepad, button: Phaser.Input.Gamepad.Button, value: number): void {
|
||||||
|
if (!this.scene.gamepadSupport) return;
|
||||||
const actionMapping = this.getActionGamepadMapping();
|
const actionMapping = this.getActionGamepadMapping();
|
||||||
const buttonUp = actionMapping.hasOwnProperty(button.index) && actionMapping[button.index];
|
const buttonUp = actionMapping.hasOwnProperty(button.index) && actionMapping[button.index];
|
||||||
if (buttonUp !== undefined) {
|
if (buttonUp !== undefined) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user