mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-24 21:46:56 +00:00
Wire view-mode toggles (alt-view + coordinate grid) via new ViewModeController
Moves the AlternateViewEvent / ToggleCoordinateGridEvent subscriptions out of ClientGameRunner into a dedicated controller in src/client/controllers/. Also wires ToggleCoordinateGridEvent (M keybind) — previously emitted with no listener — so the persistent coordinate-grid toggle works. Grid + alt-view hide names only under alt-view; M keeps names visible.
This commit is contained in:
@@ -8,6 +8,7 @@ import { UIState } from "../UIState";
|
||||
import { BuildPreviewController } from "../controllers/BuildPreviewController";
|
||||
import { HoverHighlightController } from "../controllers/HoverHighlightController";
|
||||
import { StructureHighlightController } from "../controllers/StructureHighlightController";
|
||||
import { ViewModeController } from "../controllers/ViewModeController";
|
||||
import { WarshipSelectionController } from "../controllers/WarshipSelectionController";
|
||||
import { GameView as WebGLGameView } from "../render/gl";
|
||||
import { FrameProfiler } from "./FrameProfiler";
|
||||
@@ -281,6 +282,7 @@ export function createRenderer(
|
||||
),
|
||||
new HoverHighlightController(game, eventBus, transformHandler, view),
|
||||
new StructureHighlightController(eventBus, view),
|
||||
new ViewModeController(eventBus, view),
|
||||
new AttackingTroopsOverlay(game, transformHandler, eventBus, userSettings),
|
||||
eventsDisplay,
|
||||
actionableEvents,
|
||||
|
||||
Reference in New Issue
Block a user