mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 07:40:43 +00:00
rename client/graphics → client/hud
The contents (Lit web components for in-game chat, build menu, leaderboard, attack displays, etc.) are HUD, not graphics — the actual graphics is in client/render/.
This commit is contained in:
@@ -66,7 +66,7 @@ import {
|
||||
} from "./Transport";
|
||||
import { createCanvas } from "./Utils";
|
||||
import { WebGLFrameBuilder } from "./WebGLFrameBuilder";
|
||||
import { createRenderer, GameRenderer } from "./graphics/GameRenderer";
|
||||
import { createRenderer, GameRenderer } from "./hud/GameRenderer";
|
||||
import { GameView as WebGLGameView } from "./render/gl";
|
||||
import { ALL_UNIT_TYPES } from "./render/types";
|
||||
import { SoundManager } from "./sound/SoundManager";
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Primary sources:
|
||||
* - vendor/openfront/src/core/configuration/DefaultConfig.ts (DefaultConfig, DefaultServerConfig)
|
||||
* - vendor/openfront/src/client/graphics/layers/FxLayer.ts (visual-only constants)
|
||||
* - vendor/openfront/src/client/hud/layers/FxLayer.ts (visual-only constants)
|
||||
*/
|
||||
|
||||
import {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { placeName } from "../client/graphics/NameBoxCalculator";
|
||||
import { placeName } from "../client/hud/NameBoxCalculator";
|
||||
import { Config } from "./configuration/Config";
|
||||
import { Executor } from "./execution/ExecutionManager";
|
||||
import { RecomputeRailClusterExecution } from "./execution/RecomputeRailClusterExecution";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { computeAllianceClipPath } from "../src/client/graphics/PlayerIcons";
|
||||
import { computeAllianceClipPath } from "../src/client/hud/PlayerIcons";
|
||||
|
||||
describe("PlayerIcons", () => {
|
||||
describe("computeAllianceClipPath", () => {
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
MenuElementParams,
|
||||
rootMenuElement,
|
||||
Slot,
|
||||
} from "../../../src/client/graphics/layers/RadialMenuElements";
|
||||
} from "../../../src/client/hud/layers/RadialMenuElements";
|
||||
import { UnitType } from "../../../src/core/game/Game";
|
||||
import { TileRef } from "../../../src/core/game/GameMap";
|
||||
import { GameView, PlayerView } from "../../../src/core/game/GameView";
|
||||
@@ -16,7 +16,7 @@ vi.mock("../../../src/client/Utils", () => ({
|
||||
renderNumber: vi.fn((num: number) => num.toString()),
|
||||
}));
|
||||
|
||||
vi.mock("../../../src/client/graphics/layers/BuildMenu", async () => {
|
||||
vi.mock("../../../src/client/hud/layers/BuildMenu", async () => {
|
||||
const { UnitType } = await vi.importActual<
|
||||
typeof import("../../../src/core/game/Game")
|
||||
>("../../../src/core/game/Game");
|
||||
|
||||
@@ -2,7 +2,7 @@ import { describe, expect, test } from "vitest";
|
||||
import {
|
||||
alignClusterOrder,
|
||||
computeLabelScale,
|
||||
} from "../../../../src/client/graphics/layers/AttackingTroopsOverlay";
|
||||
} from "../../../../src/client/hud/layers/AttackingTroopsOverlay";
|
||||
import { Cell } from "../../../../src/core/game/Game";
|
||||
|
||||
describe("computeLabelScale", () => {
|
||||
|
||||
@@ -21,7 +21,7 @@ vi.mock("lit/directives/unsafe-html.js", () => ({
|
||||
UnsafeHTMLDirective: class {},
|
||||
}));
|
||||
|
||||
import { EventsDisplay } from "../../../../src/client/graphics/layers/EventsDisplay";
|
||||
import { EventsDisplay } from "../../../../src/client/hud/layers/EventsDisplay";
|
||||
import { MessageType } from "../../../../src/core/game/Game";
|
||||
|
||||
describe("EventsDisplay - alliance renewal cleanup (allianceID based)", () => {
|
||||
|
||||
@@ -27,8 +27,8 @@ vi.mock("../../../../src/client/components/ui/ActionButton", () => ({
|
||||
}));
|
||||
|
||||
import { actionButton } from "../../../../src/client/components/ui/ActionButton";
|
||||
import { PlayerModerationModal } from "../../../../src/client/graphics/layers/PlayerModerationModal";
|
||||
import { PlayerPanel } from "../../../../src/client/graphics/layers/PlayerPanel";
|
||||
import { PlayerModerationModal } from "../../../../src/client/hud/layers/PlayerModerationModal";
|
||||
import { PlayerPanel } from "../../../../src/client/hud/layers/PlayerPanel";
|
||||
import { SendKickPlayerIntentEvent } from "../../../../src/client/Transport";
|
||||
import { PlayerType } from "../../../../src/core/game/Game";
|
||||
import { PlayerView } from "../../../../src/core/game/GameView";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { vi } from "vitest";
|
||||
|
||||
// Mock BuildMenu to avoid importing lit and other ESM-heavy deps in this unit test
|
||||
vi.mock("../src/client/graphics/layers/BuildMenu", () => ({
|
||||
vi.mock("../src/client/hud/layers/BuildMenu", () => ({
|
||||
BuildMenu: class {},
|
||||
flattenedBuildTable: [],
|
||||
}));
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
COLORS,
|
||||
rootMenuElement,
|
||||
type MenuElementParams,
|
||||
} from "../src/client/graphics/layers/RadialMenuElements";
|
||||
} from "../src/client/hud/layers/RadialMenuElements";
|
||||
|
||||
// Minimal stubs to satisfy types used in rootMenuElement.subMenu and allyBreak actions
|
||||
const makePlayer = (
|
||||
|
||||
Reference in New Issue
Block a user