mirror of
https://github.com/rh-hideout/pokeemerald-expansion.git
synced 2026-03-21 18:04:50 -05:00
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:
commit
3ac2f9b74d
|
|
@ -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>`;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user