diff options
author | 0neGal <mail@0negal.com> | 2024-06-18 21:34:20 +0200 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2024-06-18 21:34:20 +0200 |
commit | 9b616f9f3d0f3e610637ec0823e7ec4eadf2fab4 (patch) | |
tree | c810a9439e3a9a5e787dc5bab4e070079cd9e371 | |
parent | d5382d76317550c760cf6daa6f2daf35acd6dd45 (diff) | |
download | Viper-9b616f9f3d0f3e610637ec0823e7ec4eadf2fab4.tar.gz Viper-9b616f9f3d0f3e610637ec0823e7ec4eadf2fab4.zip |
make center cluster buttons open settings popup
-rw-r--r-- | src/app/js/gamepad.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/app/js/gamepad.js b/src/app/js/gamepad.js index 5618b0c..789b27f 100644 --- a/src/app/js/gamepad.js +++ b/src/app/js/gamepad.js @@ -1,4 +1,5 @@ const popups = require("./popups"); +const settings = require("./settings"); const launcher = require("./launcher"); const navigate = require("./navigate"); @@ -161,11 +162,15 @@ setInterval(() => { // interpret `ii` as a specific button/action, using the // standard IDs: https://w3c.github.io/gamepad/#remapping switch(ii) { - // change active section + // settings popup (center cluster buttons) + case 8: settings.popup.toggle(); break; + case 9: settings.popup.toggle(); break; + + // change active section (top bumpers) case 4: launcher.relative_section("left"); break; case 5: launcher.relative_section("right"); break; - // navigate selection + // navigate selection (dpad) case 12: navigate.move("up"); break; case 13: navigate.move("down"); break; case 14: navigate.move("left"); break; |