Show game over as overlay on top of game screen

- Make gameover-screen a fixed overlay with semi-transparent background
- Removed 'screen' class from gameover-screen element
- Game scene remains visible behind game over overlay
This commit is contained in:
2026-03-20 07:55:36 -07:00
parent f9cafe630c
commit 45f6d0d0c3
3 changed files with 40 additions and 3 deletions
+6 -1
View File
@@ -72,6 +72,7 @@ class UIManager {
}
handleBackToLobby() {
this.hideGameOver();
this.showScreen('room');
}
@@ -119,7 +120,11 @@ class UIManager {
this.displays.finalScores.appendChild(item);
});
this.showScreen('gameover');
this.screens.gameover.classList.add('active');
}
hideGameOver() {
this.screens.gameover.classList.remove('active');
}
}