diff --git a/src/AcDream.App/Rendering/GameWindow.cs b/src/AcDream.App/Rendering/GameWindow.cs index 7c6bfd22..e04a1622 100644 --- a/src/AcDream.App/Rendering/GameWindow.cs +++ b/src/AcDream.App/Rendering/GameWindow.cs @@ -2138,18 +2138,25 @@ public sealed class GameWindow : IDisposable } } - // Phase D.2b-A — placeholder inventory window. Starts HIDDEN; F12 - // (InputAction.ToggleInventoryPanel) reveals it via the UiRoot window - // manager. Throwaway scaffolding: Sub-phase B replaces the body with the - // real gmInventoryUI (0x21000023) nested layout, keeping the same name. - var inventoryWindow = new AcDream.App.UI.UiNineSlicePanel(ResolveChrome) + // Phase D.2b-B — the real inventory window from LayoutDesc 0x21000023 (gmInventoryUI), + // via the LayoutImporter. The sub-window mount pulls in the nested paperdoll/backpack/ + // 3D-items panels (Type-0 leaves inheriting BaseLayoutId 0x21000024/22/21). Starts + // HIDDEN; F12 toggles it via the window manager. Position is the dat's own (X=500,Y=138). + AcDream.App.UI.Layout.ImportedLayout? invLayout; + lock (_datLock) + invLayout = AcDream.App.UI.Layout.LayoutImporter.Import( + _dats!, 0x21000023u, ResolveChrome, vitalsDatFont); + if (invLayout is not null) { - Left = 220, Top = 120, Width = 320, Height = 400, - Visible = false, - }; - _uiHost.Root.AddChild(inventoryWindow); - _uiHost.RegisterWindow(AcDream.App.UI.WindowNames.Inventory, inventoryWindow); - Console.WriteLine("[D.2b-A] placeholder inventory window registered (F12 toggles)."); + var inventoryWindow = invLayout.Root; + inventoryWindow.Visible = false; + inventoryWindow.Anchors = AcDream.App.UI.AnchorEdges.None; // user-positioned + inventoryWindow.Draggable = true; + _uiHost.Root.AddChild(inventoryWindow); + _uiHost.RegisterWindow(AcDream.App.UI.WindowNames.Inventory, inventoryWindow); + Console.WriteLine("[D.2b-B] retail inventory window from LayoutDesc importer (0x21000023)."); + } + else Console.WriteLine("[D.2b-B] inventory: LayoutDesc 0x21000023 not found."); } // Phase N.4+N.5 — WB rendering pipeline foundation. The modern path is