This commit is contained in:
2025-12-08 11:28:44 +01:00
parent b750f320fc
commit 3336b59e7d
7 changed files with 155 additions and 8 deletions

View File

@@ -362,25 +362,28 @@ class UIScene extends Phaser.Scene {
// Draw Sprite
const sprite = this.add.sprite(x + size / 2, y + size / 2, textureKey);
// Scale to fit slot (32px slot, maybe 24px icon)
const scale = (size - 8) / Math.max(sprite.width, sprite.height);
sprite.setScale(scale);
// Larger scale for better visibility (fill most of the slot)
const scale = (size - 4) / Math.max(sprite.width, sprite.height);
sprite.setScale(scale * 1.2); // 20% bigger!
// Crisp 2D rendering
sprite.setTexture(textureKey);
slotGraphics.itemSprite = sprite;
} else {
// Fallback Text
// Fallback Text - bigger and bolder
const text = this.add.text(x + size / 2, y + size / 2,
type.substring(0, 2).toUpperCase(),
{ fontSize: '12px', align: 'center', color: '#ffff00', stroke: '#000', strokeThickness: 2 }
type.substring(0, 3).toUpperCase(),
{ fontSize: '16px', align: 'center', color: '#ffff00', stroke: '#000', strokeThickness: 3, fontStyle: 'bold' }
).setOrigin(0.5);
slotGraphics.itemText = text;
}
// Draw Count (if > 1)
// Draw Count (if > 1) - bigger and bolder
if (slots[i].count > 1) {
const countText = this.add.text(x + size - 2, y + size - 2,
slots[i].count.toString(),
{ fontSize: '10px', align: 'right', color: '#ffffff', stroke: '#000', strokeThickness: 2 }
{ fontSize: '14px', align: 'right', color: '#ffffff', stroke: '#000', strokeThickness: 3, fontStyle: 'bold' }
).setOrigin(1, 1);
slotGraphics.countText = countText;
}