diff --git a/client/src/ui/TimeIndicator.ts b/client/src/ui/TimeIndicator.ts index 0ad6d08..7644f19 100644 --- a/client/src/ui/TimeIndicator.ts +++ b/client/src/ui/TimeIndicator.ts @@ -35,6 +35,7 @@ export class TimeIndicator { color: #e0d0b0; text-shadow: 0 0 4px #00000088; white-space: nowrap; + line-height: 1; `; this.dayLabel.textContent = 'Day 1'; @@ -129,17 +130,17 @@ export class TimeIndicator { /** @param gameTime normalized 0-1 through the full day/night cycle */ update(gameTime: number, dayNumber: number): void { - // Only update when visually changed (quantize to avoid thrash) - const key = Math.round(gameTime * 200).toString(); - if (key === this.lastTimeKey) return; - this.lastTimeKey = key; - - // Update day label when day changes + // Update day label when day changes (before early return so it's never skipped) if (dayNumber !== this.lastDayNumber) { this.lastDayNumber = dayNumber; this.dayLabel.textContent = `Day ${dayNumber}`; } + // Only update when visually changed (quantize to avoid thrash) + const key = Math.round(gameTime * 200).toString(); + if (key === this.lastTimeKey) return; + this.lastTimeKey = key; + // gameTime 0-1 maps linearly across the track // Track total inner width = daySection + 2px divider + nightSection const totalWidth = 240 + 2; // 240px sections + 2px divider