Press-and-hold peeks a segment — the tooltip, for hands without a mouse
The same 450ms hold that peeks a square now works on walls, doors, and fire walls: the segment's full description (state, lock, hitpoints, the fire's burn warning) rises in the peek scrim. Shimmering illusions keep their richer tap modal. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0138A8CjeQRpvzKxuMfz1Bqc
This commit is contained in:
co-authored by
Claude Fable 5
parent
497c2245a3
commit
0f91d30a3e
@@ -26,6 +26,7 @@
|
||||
onWarpClick,
|
||||
onCellPeek,
|
||||
onIllusionClick,
|
||||
onEdgePeek,
|
||||
markedCell = null,
|
||||
markedCells = null,
|
||||
litCells = null,
|
||||
@@ -47,6 +48,8 @@
|
||||
onCellPeek?: (cell: { x: number; y: number }) => void;
|
||||
/** Tap on a shimmering (untested) illusion wall: offer the belief test. */
|
||||
onIllusionClick?: (cell: { x: number; y: number }, side: Side) => void;
|
||||
/** Press-and-hold a wall/door/fire segment: its tooltip, for touch. */
|
||||
onEdgePeek?: (tip: string) => void;
|
||||
/** First square of a two-square spell: marked so the click reads as taken. */
|
||||
markedCell?: { x: number; y: number } | null;
|
||||
/** A multi-square placement in progress (boobytrap tokens), in click
|
||||
@@ -387,7 +390,7 @@
|
||||
<!-- walls & doors & firewalls -->
|
||||
{#each edges as e (`${e.kind}:${e.x},${e.y}`)}
|
||||
{#if e.state === "firewall"}
|
||||
<FirewallEdge x={e.x} y={e.y} kind={e.kind === "V" ? "V" : "H"} />
|
||||
<FirewallEdge x={e.x} y={e.y} kind={e.kind === "V" ? "V" : "H"} onpeek={onEdgePeek} />
|
||||
{:else}
|
||||
{@const lockTitle = e.lock === "removed" ? "lock removed — swings free"
|
||||
: e.lock === "jammed" ? "lock jammed — sealed for good"
|
||||
@@ -396,7 +399,8 @@
|
||||
<EdgeGlyph x={e.x} y={e.y} kind={e.kind === "V" ? "V" : "H"}
|
||||
state={e.state === "door" ? "door" : "wall"}
|
||||
lock={(e.lock ?? null) as "removed" | "jammed" | "held" | "ajar" | null}
|
||||
title={lockTitle} damage={view.wallDamage[`${e.kind}:${e.x},${e.y}`] ?? 0} />
|
||||
title={lockTitle} damage={view.wallDamage[`${e.kind}:${e.x},${e.y}`] ?? 0}
|
||||
onpeek={onEdgePeek} />
|
||||
{/if}
|
||||
{/each}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user