From 7f43db03dffd74f7e0be45f608673719ab5ded61 Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Wed, 17 Jul 2024 07:58:51 +0700 Subject: [PATCH] Press LB/RB to focus setting tabs --- src/modules/stream/stream-settings.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/stream/stream-settings.ts b/src/modules/stream/stream-settings.ts index dd6fca8..cff4aac 100644 --- a/src/modules/stream/stream-settings.ts +++ b/src/modules/stream/stream-settings.ts @@ -362,6 +362,10 @@ export class StreamSettings { document.activeElement && document.activeElement.dispatchEvent(new MouseEvent('click')); } else if (pressedButton === GamepadKey.B) { this.hide(); + } else if (pressedButton === GamepadKey.LB || pressedButton === GamepadKey.RB) { + // Go to next/previous tab + const $currentTab = this.$tabs!.querySelector('.bx-active') as HTMLElement; + $currentTab && this.#handleTabsNavigation($currentTab, pressedButton === GamepadKey.LB ? FocusDirection.UP : FocusDirection.DOWN); } if (pressedButton === GamepadKey.UP) {