mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-21 02:16:10 +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";
|
} from "./Transport";
|
||||||
import { createCanvas } from "./Utils";
|
import { createCanvas } from "./Utils";
|
||||||
import { WebGLFrameBuilder } from "./WebGLFrameBuilder";
|
import { WebGLFrameBuilder } from "./WebGLFrameBuilder";
|
||||||
import { createRenderer, GameRenderer } from "./graphics/GameRenderer";
|
import { createRenderer, GameRenderer } from "./hud/GameRenderer";
|
||||||
import { GameView as WebGLGameView } from "./render/gl";
|
import { GameView as WebGLGameView } from "./render/gl";
|
||||||
import { ALL_UNIT_TYPES } from "./render/types";
|
import { ALL_UNIT_TYPES } from "./render/types";
|
||||||
import { SoundManager } from "./sound/SoundManager";
|
import { SoundManager } from "./sound/SoundManager";
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Primary sources:
|
* Primary sources:
|
||||||
* - vendor/openfront/src/core/configuration/DefaultConfig.ts (DefaultConfig, DefaultServerConfig)
|
* - 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 {
|
import {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { placeName } from "../client/graphics/NameBoxCalculator";
|
import { placeName } from "../client/hud/NameBoxCalculator";
|
||||||
import { Config } from "./configuration/Config";
|
import { Config } from "./configuration/Config";
|
||||||
import { Executor } from "./execution/ExecutionManager";
|
import { Executor } from "./execution/ExecutionManager";
|
||||||
import { RecomputeRailClusterExecution } from "./execution/RecomputeRailClusterExecution";
|
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("PlayerIcons", () => {
|
||||||
describe("computeAllianceClipPath", () => {
|
describe("computeAllianceClipPath", () => {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
MenuElementParams,
|
MenuElementParams,
|
||||||
rootMenuElement,
|
rootMenuElement,
|
||||||
Slot,
|
Slot,
|
||||||
} from "../../../src/client/graphics/layers/RadialMenuElements";
|
} from "../../../src/client/hud/layers/RadialMenuElements";
|
||||||
import { UnitType } from "../../../src/core/game/Game";
|
import { UnitType } from "../../../src/core/game/Game";
|
||||||
import { TileRef } from "../../../src/core/game/GameMap";
|
import { TileRef } from "../../../src/core/game/GameMap";
|
||||||
import { GameView, PlayerView } from "../../../src/core/game/GameView";
|
import { GameView, PlayerView } from "../../../src/core/game/GameView";
|
||||||
@@ -16,7 +16,7 @@ vi.mock("../../../src/client/Utils", () => ({
|
|||||||
renderNumber: vi.fn((num: number) => num.toString()),
|
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<
|
const { UnitType } = await vi.importActual<
|
||||||
typeof import("../../../src/core/game/Game")
|
typeof import("../../../src/core/game/Game")
|
||||||
>("../../../src/core/game/Game");
|
>("../../../src/core/game/Game");
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { describe, expect, test } from "vitest";
|
|||||||
import {
|
import {
|
||||||
alignClusterOrder,
|
alignClusterOrder,
|
||||||
computeLabelScale,
|
computeLabelScale,
|
||||||
} from "../../../../src/client/graphics/layers/AttackingTroopsOverlay";
|
} from "../../../../src/client/hud/layers/AttackingTroopsOverlay";
|
||||||
import { Cell } from "../../../../src/core/game/Game";
|
import { Cell } from "../../../../src/core/game/Game";
|
||||||
|
|
||||||
describe("computeLabelScale", () => {
|
describe("computeLabelScale", () => {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ vi.mock("lit/directives/unsafe-html.js", () => ({
|
|||||||
UnsafeHTMLDirective: class {},
|
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";
|
import { MessageType } from "../../../../src/core/game/Game";
|
||||||
|
|
||||||
describe("EventsDisplay - alliance renewal cleanup (allianceID based)", () => {
|
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 { actionButton } from "../../../../src/client/components/ui/ActionButton";
|
||||||
import { PlayerModerationModal } from "../../../../src/client/graphics/layers/PlayerModerationModal";
|
import { PlayerModerationModal } from "../../../../src/client/hud/layers/PlayerModerationModal";
|
||||||
import { PlayerPanel } from "../../../../src/client/graphics/layers/PlayerPanel";
|
import { PlayerPanel } from "../../../../src/client/hud/layers/PlayerPanel";
|
||||||
import { SendKickPlayerIntentEvent } from "../../../../src/client/Transport";
|
import { SendKickPlayerIntentEvent } from "../../../../src/client/Transport";
|
||||||
import { PlayerType } from "../../../../src/core/game/Game";
|
import { PlayerType } from "../../../../src/core/game/Game";
|
||||||
import { PlayerView } from "../../../../src/core/game/GameView";
|
import { PlayerView } from "../../../../src/core/game/GameView";
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { vi } from "vitest";
|
import { vi } from "vitest";
|
||||||
|
|
||||||
// Mock BuildMenu to avoid importing lit and other ESM-heavy deps in this unit test
|
// 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 {},
|
BuildMenu: class {},
|
||||||
flattenedBuildTable: [],
|
flattenedBuildTable: [],
|
||||||
}));
|
}));
|
||||||
@@ -16,7 +16,7 @@ import {
|
|||||||
COLORS,
|
COLORS,
|
||||||
rootMenuElement,
|
rootMenuElement,
|
||||||
type MenuElementParams,
|
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
|
// Minimal stubs to satisfy types used in rootMenuElement.subMenu and allyBreak actions
|
||||||
const makePlayer = (
|
const makePlayer = (
|
||||||
|
|||||||
Reference in New Issue
Block a user