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
@@ -938,6 +938,9 @@
|
||||
clearSelection();
|
||||
}
|
||||
|
||||
// Press-and-hold on a wall/door/fire segment (touch has no hover).
|
||||
let peekEdge = $state<string | null>(null);
|
||||
|
||||
// A shimmering illusion wall, tapped or bumped: offer the belief test.
|
||||
let illusionPrompt = $state<{ cell: { x: number; y: number }; side: Side } | null>(null);
|
||||
function illusionEdgeParts(key: string): { cell: { x: number; y: number }; side: Side } {
|
||||
@@ -1130,11 +1133,13 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if peekCard || discardPeek || peekTreasure}
|
||||
{#if peekCard || discardPeek || peekTreasure || peekEdge}
|
||||
<div class="big-peek-scrim" role="button" tabindex="-1"
|
||||
onclick={() => { peekCard = null; peekCreatureId = null; peekToken = null; discardPeek = null; peekTreasure = null; }} onkeydown={() => {}}>
|
||||
onclick={() => { peekCard = null; peekCreatureId = null; peekToken = null; discardPeek = null; peekTreasure = null; peekEdge = null; }} onkeydown={() => {}}>
|
||||
<div class="big-peek">
|
||||
{#if peekTreasure}
|
||||
{#if peekEdge}
|
||||
<div class="peek-note big-peek-note">{peekEdge}</div>
|
||||
{:else if peekTreasure}
|
||||
<img class="big-peek-token" src={peekTreasure.src} alt="" />
|
||||
<div class="peek-note big-peek-note">{peekTreasure.note}</div>
|
||||
{:else}
|
||||
@@ -1559,6 +1564,7 @@
|
||||
onGhostClick={clickGhostSlot}
|
||||
onCellPeek={(c) => peekAt(c)}
|
||||
onIllusionClick={(cell, side) => (illusionPrompt = { cell, side })}
|
||||
onEdgePeek={(tip) => (peekEdge = tip)}
|
||||
{litCells}
|
||||
{sightTrace}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user