mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-24 09:44:00 +00:00
Highlight matching structures on UnitDisplay hover
Wires the existing ToggleStructureEvent (emitted on UnitDisplay button mouseenter/leave) to view.setHighlightStructureTypes via a small StructureHighlightController. StructurePass + StructureLevelPass already implement the highlight visual — this just connects the two ends.
This commit is contained in:
@@ -7,6 +7,7 @@ import { TransformHandler } from "../TransformHandler";
|
||||
import { UIState } from "../UIState";
|
||||
import { BuildPreviewController } from "../controllers/BuildPreviewController";
|
||||
import { HoverHighlightController } from "../controllers/HoverHighlightController";
|
||||
import { StructureHighlightController } from "../controllers/StructureHighlightController";
|
||||
import { WarshipSelectionController } from "../controllers/WarshipSelectionController";
|
||||
import { GameView as WebGLGameView } from "../render/gl";
|
||||
import { FrameProfiler } from "./FrameProfiler";
|
||||
@@ -272,6 +273,7 @@ export function createRenderer(
|
||||
new WarshipSelectionController(game, eventBus, transformHandler, view),
|
||||
new BuildPreviewController(game, eventBus, uiState, transformHandler, view),
|
||||
new HoverHighlightController(game, eventBus, transformHandler, view),
|
||||
new StructureHighlightController(eventBus, view),
|
||||
new AttackingTroopsOverlay(game, transformHandler, eventBus, userSettings),
|
||||
eventsDisplay,
|
||||
actionableEvents,
|
||||
|
||||
Reference in New Issue
Block a user