Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/web/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -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% {
Expand Down
7 changes: 4 additions & 3 deletions apps/web/src/ui/hud.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,12 @@ export function Hud({ screen, actions }: { screen: Extract<Screen, { kind: "stre
<span className="max-w-[40rem] rounded-full bg-card/95 px-4 py-2 text-center text-sm">{notice}</span>
</motion.div>
)}
{/* 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 && (
<motion.div key="captured" {...RISE} className="pointer-events-none fixed inset-x-0 bottom-[12%] flex justify-center">
<span className="rounded-full bg-card/95 px-4 py-2 text-sm">
<span className="animate-[pf-exit-hint_6s_forwards] rounded-full bg-card/95 px-4 py-2 text-sm">
Mouse captured — press <kbd className="rounded bg-white/10 px-1.5 py-0.5 font-mono text-xs">Esc</kbd> to release
</span>
</motion.div>
Expand Down
Loading