fix(spatial-office#12): show agent name labels only on hover
Per design-critique-1 Issue 3 (P1), agent name labels were always visible and stacked into unreadable text when agents were near each other. Now matches Stardew Valley convention: name shows on hover only. Single conditional change. The hover tooltip (Html overlay with status + current task) is unchanged.
This commit is contained in:
parent
62f9afc011
commit
f632f816a4
1 changed files with 18 additions and 16 deletions
|
|
@ -132,7 +132,8 @@ export default function AgentSprite({ agent, hovered, onHover }) {
|
|||
/>
|
||||
</mesh>
|
||||
|
||||
{/* Agent name label */}
|
||||
{/* Agent name label — hover only (per design-critique-1 Issue 3, P1) */}
|
||||
{hovered && (
|
||||
<Text
|
||||
position={
|
||||
targetPos
|
||||
|
|
@ -148,6 +149,7 @@ export default function AgentSprite({ agent, hovered, onHover }) {
|
|||
>
|
||||
{agent.name}
|
||||
</Text>
|
||||
)}
|
||||
|
||||
{/* Hover tooltip */}
|
||||
{hovered && (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue