mirror of
https://github.com/AndrioCelos/TableturfBattleApp.git
synced 2026-10-22 09:33:26 -05:00
Recolour some UI elements to match the player's ink
This commit is contained in:
@@ -5,6 +5,7 @@ interface Player {
|
||||
colour: Colour;
|
||||
specialColour: Colour;
|
||||
specialAccentColour: Colour;
|
||||
uiBaseColourIsSpecialColour?: boolean;
|
||||
totalSpecialPoints: number;
|
||||
passes: number;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ function clearUrlFromGame() {
|
||||
location.hash = '';
|
||||
}
|
||||
|
||||
function onGameStateChange(game: any, playerData: any) {
|
||||
function onGameStateChange(game: any, playerData: PlayerData | null) {
|
||||
if (currentGame == null)
|
||||
throw new Error('currentGame is null');
|
||||
clearPlayContainers();
|
||||
@@ -78,6 +78,9 @@ function onGameStateChange(game: any, playerData: any) {
|
||||
board.refresh();
|
||||
}
|
||||
loadPlayers(game.players);
|
||||
gamePage.dataset.myPlayerIndex = playerData ? playerData.playerIndex.toString() : '';
|
||||
gamePage.dataset.uiBaseColourIsSpecialColour = playerData && game.players[playerData.playerIndex].uiBaseColourIsSpecialColour ? 'true' : 'false';
|
||||
|
||||
redrawModal.hidden = true;
|
||||
gamePage.classList.remove('gameEnded');
|
||||
switch (game.state) {
|
||||
|
||||
Reference in New Issue
Block a user