From f4b361016ec30615a3dc67ecd08154c8b3f31a0e Mon Sep 17 00:00:00 2001 From: Dasemu Date: Tue, 6 Jan 2026 18:32:27 +0100 Subject: [PATCH] feat: disable language toggle during active game - Hide language toggle button when game is in progress - Prevents language changes mid-game that could cause confusion - Language button only visible in welcome and setup screens - Auto-restores when returning to menu via exit button --- script.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index a8ceb55..cd7c36a 100644 --- a/script.js +++ b/script.js @@ -1022,11 +1022,15 @@ function confirmExitGame() { function updateExitButtonVisibility() { const exitBtn = document.getElementById('exit-game'); - // Show exit button in all phases except welcome and setup + const langBtn = document.getElementById('language-toggle'); + + // Show exit button and hide language toggle in all phases except welcome and setup if (state.phase !== 'welcome' && state.phase !== 'setup') { exitBtn.classList.add('visible'); + if (langBtn) langBtn.style.display = 'none'; } else { exitBtn.classList.remove('visible'); + if (langBtn) langBtn.style.display = 'inline-flex'; } }