Move settings to it's own modal (#1366)

## Description:

The settings has grown to the point where it deserves its own modal.
<img width="1144" alt="Screenshot 2025-07-07 at 3 55 23 PM"
src="https://github.com/user-attachments/assets/a1527d79-93c3-4bf3-ba67-dce643bc81ea"
/>

NOTE: styling is still needed.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [ ] I have added relevant tests to the test directory
- [ ] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [ ] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

evan
This commit is contained in:
evanpelle
2025-07-07 16:22:55 -07:00
committed by GitHub
parent 8aa3775bd8
commit a387909262
5 changed files with 326 additions and 189 deletions
+11
View File
@@ -27,6 +27,7 @@ import { PlayerInfoOverlay } from "./layers/PlayerInfoOverlay";
import { PlayerPanel } from "./layers/PlayerPanel";
import { RailroadLayer } from "./layers/RailroadLayer";
import { ReplayPanel } from "./layers/ReplayPanel";
import { SettingsModal } from "./layers/SettingsModal";
import { SpawnAd } from "./layers/SpawnAd";
import { SpawnTimer } from "./layers/SpawnTimer";
import { StructureIconsLayer } from "./layers/StructureIconsLayer";
@@ -152,6 +153,15 @@ export function createRenderer(
gameRightSidebar.game = game;
gameRightSidebar.eventBus = eventBus;
const settingsModal = document.querySelector(
"settings-modal",
) as SettingsModal;
if (!(settingsModal instanceof SettingsModal)) {
console.error("settings modal not found");
}
settingsModal.userSettings = userSettings;
settingsModal.eventBus = eventBus;
const gameTopBar = document.querySelector("game-top-bar") as GameTopBar;
if (!(gameTopBar instanceof GameTopBar)) {
console.error("top bar not found");
@@ -252,6 +262,7 @@ export function createRenderer(
playerInfo,
winModal,
replayPanel,
settingsModal,
teamStats,
playerPanel,
headsUpMessage,