diff --git a/src/client/graphics/layers/TerritoryLayer.ts b/src/client/graphics/layers/TerritoryLayer.ts index eedbe971c..05d47d165 100644 --- a/src/client/graphics/layers/TerritoryLayer.ts +++ b/src/client/graphics/layers/TerritoryLayer.ts @@ -85,6 +85,11 @@ export class TerritoryLayer implements Layer { tick() { const tickProfile = FrameProfiler.start(); const now = this.nowMs(); + const currentTheme = this.game.config().theme(); + if (currentTheme !== this.theme) { + this.theme = currentTheme; + this.redraw(); + } if (this.game.inSpawnPhase()) { this.spawnHighlight(); } @@ -404,7 +409,7 @@ export class TerritoryLayer implements Layer { } private hoverHighlightOptions() { - const baseColor = this.theme.spawnHighlightSelfColor(); + const baseColor = this.theme.playerHighlightColor(); const rgba = baseColor.rgba; if (this.alternativeView) { diff --git a/src/core/configuration/Config.ts b/src/core/configuration/Config.ts index e0cacf57b..6b7e08c2d 100644 --- a/src/core/configuration/Config.ts +++ b/src/core/configuration/Config.ts @@ -205,6 +205,7 @@ export interface Theme { allyColor(): Colord; neutralColor(): Colord; enemyColor(): Colord; + playerHighlightColor(): Colord; spawnHighlightColor(): Colord; spawnHighlightSelfColor(): Colord; spawnHighlightTeamColor(): Colord; diff --git a/src/core/configuration/PastelTheme.ts b/src/core/configuration/PastelTheme.ts index 23ae4e653..354ca3dc8 100644 --- a/src/core/configuration/PastelTheme.ts +++ b/src/core/configuration/PastelTheme.ts @@ -35,6 +35,8 @@ export class PastelTheme implements Theme { /** Alternate View colors for enemies, red */ private _enemyColor = colord("rgb(255,0,0)"); + /** Hover highlight color for player territories */ + private _playerHighlightColor = colord("rgb(221, 221, 221)"); /** Default spawn highlight colors for other players in FFA, yellow */ private _spawnHighlightColor = colord("rgb(255,213,79)"); /** Added non-default spawn highlight colors for self, full white */ @@ -209,6 +211,9 @@ export class PastelTheme implements Theme { enemyColor(): Colord { return this._enemyColor; } + playerHighlightColor(): Colord { + return this._playerHighlightColor; + } spawnHighlightColor(): Colord { return this._spawnHighlightColor; diff --git a/src/core/configuration/PastelThemeDark.ts b/src/core/configuration/PastelThemeDark.ts index 2cff80685..d840f0fb6 100644 --- a/src/core/configuration/PastelThemeDark.ts +++ b/src/core/configuration/PastelThemeDark.ts @@ -8,6 +8,7 @@ export class PastelThemeDark extends PastelTheme { private darkWater = colord("rgb(14,11,30)"); private darkShorelineWater = colord("rgb(50,50,50)"); + private darkPlayerHighlight = colord("rgb(99, 42, 42)"); // | Terrain Type | Magnitude | Base Color Logic | Visual Description | // | :---------------- | :-------- | :---------------------------------------------- | :-------------------- | @@ -59,4 +60,8 @@ export class PastelThemeDark extends PastelTheme { }); } } + + playerHighlightColor(): Colord { + return this.darkPlayerHighlight; + } }