Rework - Inputs management to include all gamepad mapping V2 (#429)
* rework of the input handling, including different gamepad and keyboard * rework of the input handling, including different gamepad and keyboard * first version of a too complex inputHandler based on phaser3-merged-input * removed useless control management and kept it simple for our use case, investigating to put out button_XX() * renamed inputHandler to inputController * aggregate directions and some action into a same method + fix menu return value * added back repeated input feature on keeping down a key * cleanup + return type * fix submit/action doing two things simultaneously, still same behaviour as before * extracted UI inputs out of battle-scene * tab -> spaces * tab -> spaces what about now github ? * tab -> spaces final (maybe) * tried to fix the plugin loading issue on prod * remove Plugins things as it's too uncertain how it works on prod * seems old code source is indented with tab * cleanup * cleanup * cleanup * putting in an enum file the enum buttons * fix repeating stats button + change message in event when the key is repeating * added return type for ui-inputs * added return type for inputs-controller * adapted the code to integrate changes of bennybroseph
This commit is contained in:
1 parent
3ed7649ce5
commit
d98f7733d4
35 files changed
+599
-299
No files matched your search
@@ -152,7 +152,7 @@ export function setSetting(scene: BattleScene, setting: Setting, value: integer)
|
||||
scene.gamepadSupport = settingOptions[setting][value] !== 'Disabled';
|
||||
break;
|
||||
case Setting.Swap_A_and_B:
|
||||
scene.setGamepadConfirm(settingOptions[setting][value] !== 'Enabled');
|
||||
scene.abSwapped = settingOptions[setting][value] !== 'Disabled';
|
||||
break;
|
||||
case Setting.Touch_Controls:
|
||||
scene.enableTouchControls = settingOptions[setting][value] !== 'Disabled' && hasTouchscreen();
|
||||
|
||||
Reference in new issue
Block a user