mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-22 19:17:03 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user