From 9b616f9f3d0f3e610637ec0823e7ec4eadf2fab4 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Tue, 18 Jun 2024 21:34:20 +0200 Subject: make center cluster buttons open settings popup --- src/app/js/gamepad.js | 9 +++++++-- 1 file 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; -- cgit v1.2.3