From a74f2a28a967f617fe4b280b8c10540f4e6aa0a1 Mon Sep 17 00:00:00 2001 From: Justin Oros Date: Wed, 20 May 2026 12:49:33 -0700 Subject: [PATCH] =?UTF-8?q?Fix=20diagonal=20corner=20artifact=20=E2=80=94?= =?UTF-8?q?=20map-talk-hint=20was=20animating=20at=200,0=20before=20JS=20p?= =?UTF-8?q?ositioned=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game.js | 4 ++-- style.css | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/game.js b/game.js index 61de6b9..04e77c9 100644 --- a/game.js +++ b/game.js @@ -436,9 +436,9 @@ class Game { const hint = document.getElementById('map-talk-hint'); const bub = document.getElementById('npc-bubble'); if (hint) { - hint.style.display = near ? 'block' : 'none'; hint.style.left = (viewW / 2 - 28) + 'px'; hint.style.bottom = (viewH * 0.50) + 'px'; + hint.classList.toggle('visible', near); } if (bub) bub.style.opacity = near ? '0' : '1'; this._updateDirArrow(near); @@ -503,7 +503,7 @@ class Game { } this._applyCamera(); const hint = document.getElementById('map-talk-hint'); - if (hint) hint.style.display = 'none'; + if (hint) hint.classList.remove('visible'); } /* ══════════════════════════════════════════════════════════ diff --git a/style.css b/style.css index ff51fcc..8a251b3 100644 --- a/style.css +++ b/style.css @@ -498,7 +498,7 @@ html, body { background-position: 0 0; image-rendering: pixelated; filter: drop-shadow(2px 3px 0 rgba(0,0,0,.4)); - z-index: 99; + z-index: 9999; font-size: 0; color: transparent; } @@ -519,8 +519,13 @@ html, body { padding: 3px 6px; white-space: nowrap; z-index: 11; - animation: talkBubble .6s ease-in-out infinite; pointer-events: none; + display: none; + bottom: -9999px; +} +.map-talk-hint.visible { + display: block; + animation: talkBubble .6s ease-in-out infinite; } /* Desktop: show "Press E", hide "Press A" */ .hint-touch { display: none; }