feat(ui): D.2b empty-slot art — InventoryController applies per-list empty sprites

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-06-22 11:05:12 +02:00
parent 4785232523
commit 8c719cd3e9
2 changed files with 29 additions and 3 deletions

View file

@ -240,6 +240,19 @@ public class InventoryControllerTests
Assert.Equal(0u, containers.GetItem(2)!.ItemId); // empty frame
}
[Fact]
public void Empty_sprites_are_applied_to_the_three_lists()
{
var (layout, grid, containers, top, _, _, _, _) = BuildLayout();
InventoryController.Bind(layout, new ClientObjectTable(), () => Player,
iconIds: (_, _, _, _, _) => 0u, strength: () => 100, datFont: null,
contentsEmptySprite: 0x06004D20u, sideBagEmptySprite: 0x06005D9Cu, mainPackEmptySprite: 0x06005D9Cu);
Assert.Equal(0x06004D20u, grid.GetItem(0)!.EmptySprite); // a padded empty contents cell
Assert.Equal(0x06005D9Cu, containers.GetItem(0)!.EmptySprite); // a padded empty side-bag cell
Assert.Equal(0x06005D9Cu, top.GetItem(0)!.EmptySprite); // the main-pack cell
}
// Reads the text of the UiText caption child attached by the controller.
private static string CaptionText(UiElement host)
{