From cb1d750f25ba074f324cc8b7134f1d047c4378ae Mon Sep 17 00:00:00 2001 From: Justin Oros Date: Thu, 21 May 2026 09:22:19 -0700 Subject: [PATCH] Fix A/B overlap in landscape using fixed positioning; fix player idle frame to use lastDir --- game.js | 2 +- style.css | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/game.js b/game.js index 590c2c1..c6e4b38 100644 --- a/game.js +++ b/game.js @@ -554,7 +554,7 @@ class Game { p.style.left = cx + 'px'; p.style.bottom = bot + 'px'; p.className = 'map-player idle'; - p.style.backgroundPositionX = idleFrames[this.state.pathDir] || '-32px'; + p.style.backgroundPositionX = idleFrames[this.state.lastDir] || '-32px'; if (bub) { bub.style.left = (cx - 4) + 'px'; bub.style.bottom = (bot + 66) + 'px'; } } this._applyCamera(); diff --git a/style.css b/style.css index 917f66a..5bb5228 100644 --- a/style.css +++ b/style.css @@ -742,10 +742,12 @@ html, body { .gba-controller.hidden { display: none; } - .dpad { width: clamp(72px, 16vh, 100px); height: clamp(72px, 16vh, 100px); } - .ab-cluster { width: 100%; height: 100%; flex: 1; } - .ab-b { bottom: 0%; left: 0%; top: auto; transform: none; } - .ab-a { top: 0%; right: 0%; transform: none; } + .dpad { width: clamp(72px, 16vh, 100px); height: clamp(72px, 16vh, 100px); } + .ab-cluster { position: static; width: 100%; height: 100%; flex: 1; } + #gba-right { position: relative; } + #gba-right .ab-btn { position: fixed; } + #gba-right .ab-b { bottom: 8px; left: 8px; top: auto; transform: none; } + #gba-right .ab-a { top: 8px; right: 8px; transform: none; } .gba-mid-btns { flex-direction: column; gap: 5px; } .gba-mid-btn { min-width: 44px; width: 44px; font-size: 5px; padding: 6px 4px; } }