pokerogue icon indicating copy to clipboard operation
pokerogue copied to clipboard

[WIP] Rework - Inputs management to include all gamepad mapping

Open Greenlamp2 opened this issue 10 months ago • 1 comments

Rework of the input handling, to allow different gamepad, not yet ready to be merged, still a WIP, everything is already working except the feature that let a key pressed and it's doing it repeatedly until we let it go.

It's food for @EmoUsedHM01 and @Flashfyre . I tried to do something readable and "clean" but i think it can be better. Let me know if i did something wrong, this is my first PR here, and hopefully not the last one.

Based on a discussion we had on discord, for the context: image image image

Greenlamp2 avatar May 01 '24 22:05 Greenlamp2

(it's also fixing the issue of the C/Shift not working anymore when a gamepad is used.)

Greenlamp2 avatar May 01 '24 23:05 Greenlamp2

I've extracted all the input detection logic into an InputsController, but i've let the Ui logic based on inputs in the battle-scene.ts. Would you like me to takle that out too ?

Greenlamp2 avatar May 03 '24 12:05 Greenlamp2

For me, everything is okay, xbox controller, generic controller, keyboard and touch. Just need someone to test the dualschock controller.

Greenlamp2 avatar May 03 '24 15:05 Greenlamp2