Merge pull request #47 from theReuben/claude/fix-sprite-display-Dev2O

Fix sprite display to show front-facing frame instead of full sheet
This commit is contained in:
Reuben Day 2026-03-21 13:19:32 +00:00 committed by GitHub
commit 3ac2f9b74d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -2140,7 +2140,7 @@ function getSpriteHtml(graphicsId, size = 32) {
const url = getSpriteUrl(graphicsId);
const name = (graphicsId || '').replace('OBJ_EVENT_GFX_', '').replace(/_/g, ' ');
return `<div class="sprite-container" style="width:${size}px;height:${size}px">
<img src="${url}" onerror="this.style.display='none';this.nextElementSibling.style.display='flex'" style="width:${size}px;height:${size}px;image-rendering:pixelated" alt="${escAttr(name)}">
<img src="${url}" onerror="this.style.display='none';this.nextElementSibling.style.display='flex'" style="height:${size}px;width:auto;image-rendering:pixelated" alt="${escAttr(name)}">
<div class="sprite-fallback" style="display:none;width:${size}px;height:${size}px">${escHtml(name.substring(0, 2).toUpperCase())}</div>
</div>`;
}

View File

@ -1200,7 +1200,7 @@ tbody tr:last-child td { border-bottom: none; }
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
justify-content: flex-start;
}
.sprite-fallback {
align-items: center;