Press LB/RB to focus setting tabs

This commit is contained in:
redphx 2024-07-17 07:58:51 +07:00
parent 742fd24b8c
commit 7f43db03df

View File

@ -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) {