diff --git a/config.json b/config.json index 755de450..bdfd28b2 100644 --- a/config.json +++ b/config.json @@ -66,7 +66,7 @@ "label": "" }, { - "action": "ui.back", + "action": "ui.pauseMenu", "actionHold": "", "label": "" } diff --git a/src/controls.ts b/src/controls.ts index bc620ad4..e270750e 100644 --- a/src/controls.ts +++ b/src/controls.ts @@ -237,9 +237,13 @@ const inModalCommand = (command: Command, pressed: boolean) => { if (pressed && !gamepadUiCursorState.display) return if (pressed) { - if (command === 'ui.back' || command === 'ui.pauseMenu') { + if (command === 'ui.back') { hideCurrentModal() } + if (command === 'ui.pauseMenu') { + // hide all modals + hideAllModals() + } if (command === 'ui.leftClick' || command === 'ui.rightClick') { // in percent const { x, y } = gamepadUiCursorState @@ -426,7 +430,6 @@ const onTriggerOrReleased = (command: Command, pressed: boolean) => { } } else if (stringStartsWith(command, 'ui')) { switch (command) { - case 'ui.back': case 'ui.pauseMenu': if (pressed) { if (activeModalStack.length) { @@ -436,6 +439,7 @@ const onTriggerOrReleased = (command: Command, pressed: boolean) => { } } break + case 'ui.back': case 'ui.toggleFullscreen': case 'ui.toggleMap': case 'ui.leftClick': diff --git a/src/react/MobileTopButtons.tsx b/src/react/MobileTopButtons.tsx index e8a82f77..f048af56 100644 --- a/src/react/MobileTopButtons.tsx +++ b/src/react/MobileTopButtons.tsx @@ -34,7 +34,7 @@ export default () => { switch (actionForStyle) { case 'general.chat': return styles['chat-btn'] - case 'ui.back': + case 'ui.pauseMenu': return styles['pause-btn'] case 'general.playersList': return styles['tab-btn']