From 7d971a2b3ea012d8074300b7db8758812f95603a Mon Sep 17 00:00:00 2001 From: Erik Date: Sat, 20 Jun 2026 22:37:01 +0200 Subject: [PATCH] =?UTF-8?q?feat(ui):=20D.2b-B=20=E2=80=94=20F12=20shows=20?= =?UTF-8?q?the=20real=20gmInventoryUI=20(0x21000023)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Swap the Sub-phase A placeholder UiNineSlicePanel for LayoutImporter.Import (0x21000023). The sub-window mount nests the paperdoll/backpack/3D-items panels; the window starts hidden, registered under WindowNames.Inventory, toggled by F12 via the window manager (unchanged). Co-Authored-By: Claude Opus 4.8 (1M context) --- src/AcDream.App/Rendering/GameWindow.cs | 29 +++++++++++++++---------- 1 file changed, 18 insertions(+), 11 deletions(-) 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