From 773459bee1dd10c3c4af481f1e099aa64d1a8969 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Thu, 5 Nov 2026 23:59:44 +0100 Subject: [PATCH] fix(web): let the captured-mouse line fade after six seconds The line that says how to release a captured mouse stayed over the picture for as long as the mouse was captured, which in a game is the whole session. It now shows each time capture starts and fades with the exit hint's own six seconds. Reported as unom/punktfunk#2298. --- apps/web/src/styles.css | 3 ++- apps/web/src/ui/hud.tsx | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/web/src/styles.css b/apps/web/src/styles.css index 5a024da..252f44e 100644 --- a/apps/web/src/styles.css +++ b/apps/web/src/styles.css @@ -204,7 +204,8 @@ var(--background); } -/* The exit hint: six seconds on screen, the last 0.6 fading, as on every client. */ +/* The exit hint and the captured-pointer line: six seconds on screen, the last 0.6 fading, as on + every client. */ @keyframes pf-exit-hint { 0%, 90% { diff --git a/apps/web/src/ui/hud.tsx b/apps/web/src/ui/hud.tsx index baabb23..b0066bc 100644 --- a/apps/web/src/ui/hud.tsx +++ b/apps/web/src/ui/hud.tsx @@ -141,11 +141,12 @@ export function Hud({ screen, actions }: { screen: Extract{notice} )} - {/* A captured pointer has no cursor, so the way out has to be on screen. The browser - releases on Escape itself; this only says so. */} + {/* A captured pointer has no cursor, so the way out goes on screen each time capture + starts, for as long as the exit hint stays. The browser releases on Escape itself; + this only says so. */} {stats.pointerCaptured && ( - + Mouse captured — press Esc to release