diff --git a/src/AcDream.App/UI/Layout/LayoutImporter.cs b/src/AcDream.App/UI/Layout/LayoutImporter.cs index ce3d1ce8..2b9c8411 100644 --- a/src/AcDream.App/UI/Layout/LayoutImporter.cs +++ b/src/AcDream.App/UI/Layout/LayoutImporter.cs @@ -86,8 +86,12 @@ public static class LayoutImporter var byId = new Dictionary(); // Root is never a Type-12 prototype in practice; fall back to a generic // container if the factory returns null for an exotic root type. - var root = BuildWidget(rootInfo, resolve, datFont, byId) - ?? new UiDatElement(rootInfo, resolve); + var root = BuildWidget(rootInfo, resolve, datFont, byId); + if (root is null) + { + Console.WriteLine($"[D.2b] LayoutImporter: root element 0x{rootInfo.Id:X8} (type {rootInfo.Type}) produced no widget — using empty container fallback."); + root = new UiDatElement(rootInfo, resolve); + } return new ImportedLayout(root, byId); } @@ -228,7 +232,8 @@ public static class LayoutImporter /// private static void ReadState(StateDesc sd, string name, ElementInfo info) { - // First MediaDescImage in this state's Media list wins (format doc §5). + // Only MediaDescImage is read for rendering; MediaDescCursor items (on grips/drag bars) + // are intentionally skipped — cursor behavior is Plan 2. foreach (var m in sd.Media) { if (m is MediaDescImage img && img.File != 0)