feat(chat): Campaign CH slice CH6a — retail chat-window layout + 8-grip resize

Swap ChatWindowController's imported main-chat LayoutDesc from the wrong
0x21000006 (an unrelated layout whose root and 800px resize bar appear
nowhere in the EoR gameplay UI) to retail's ACTUAL main chat window,
0x2100006F (window root 0x10000600, authored 410x100 — confirmed by a
direct DAT dump, found in dats.Local not dats.Portal). Every downstream
compensation that existed only to paper over the wrong import is deleted:
the hand-cropped 490px content width, the dropped 800px resize bar, the
9px transcript patch, the orphan-sibling pruning, the max/min-vs-scrollbar
overlap shift, and the scrollbar top-reclaim. The window now mounts with
RetailWindowChrome.Imported (0x2100006F's own 8 border/corner elements are
its complete chrome) instead of the universal nine-slice wrapper.

LayoutImporter/DatWidgetFactory gain a Type-9 (UIElement_Resizebar) case:
UiResizeGrip decodes retail's exact four-bool BorderLocation algorithm
(0x2A=bottom/0x2B=left/0x2C=right/0x2D=top,
UIElement_Resizebar::StartMouseResizing @0x0046B7E0) into a ResizeEdges
bitmask. A direct DAT dump established the true shape: only 7 of the 8
grip-position ids are Type 9 — the straight top-EDGE strip (0x1000069C) is
a Type-2 Dragbar (move handle), not a Resizebar, because the main window
has no title bar. UiRoot now gives a directly-hit grip's own edges
priority over its generic proximity heuristic, and a directly-hit move
handle the same priority over ambient proximity — so the plain top strip
moves the window while its two corner grips resize it including the Y
axis, and all 4 edges + 4 corners work everywhere else. This also fixes
the reported "no diagonal cursor at corners" (CursorFeedbackController's
existing RetailCursorCatalog cursor ids already matched the DAT exactly;
they just never received a genuine diagonal edge combination) and "cannot
grow in Y from the bottom-right corner" (the old NineSlice+crop mount's
indirection is gone; the Imported mount uses the DAT's real
minH=100/maxH=2000/minW=300/maxW=2000 directly).

The 8 cosmetic "_Locked" border-art twins default hidden (register row
AP-185 — retail's UiLocked-driven art swap between the two skins is not
ported; UiRoot.UiLocked continues to gate the underlying interaction
correctly either way). The 4 chat-window-1..4 indicator buttons import
generically (visible, inert) for CH6b to wire. The two hand-drawn
translucent-black tints on the transcript/input are removed now that
their parent panels draw their own authored background sprites.

Filed #366 (chat window's new-unseen-text indicator 0x1000048C is
swallowed by UiText.ConsumesDatChildren, pre-existing and out of scope).
Corrected the research doc's "all eight grips" claim against the direct
DAT dump. Full Release suite: 12,317 passed / 4 skipped / 0 failed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-08-10 09:38:27 +02:00
parent ab82347d42
commit 1fd515436c
19 changed files with 6734 additions and 5694 deletions

View file

@ -684,7 +684,7 @@ public sealed class RetailUiRuntime : IDisposable
}
if (info is null || layout is null)
{
Console.WriteLine("[D.2b] chat: LayoutDesc 0x21000006 not found.");
Console.WriteLine("[D.2b] chat: LayoutDesc 0x2100006F not found.");
return;
}
@ -698,7 +698,7 @@ public sealed class RetailUiRuntime : IDisposable
_bindings.Assets.ResolveSprite);
if (controller is null)
{
Console.WriteLine("[D.2b] chat: required role elements missing in 0x21000006.");
Console.WriteLine("[D.2b] chat: required role elements missing in 0x2100006F.");
return;
}
@ -712,27 +712,39 @@ public sealed class RetailUiRuntime : IDisposable
new RetailWindowFrame.Options
{
WindowName = WindowNames.Chat,
Chrome = RetailWindowChrome.NineSlice,
// 0x2100006F's root already IS the complete retail window — its own
// 8 border/corner elements (the live Resizebar/Dragbar grips, or their
// _Locked cosmetic twins) are its chrome, at its authored 410x100
// extent. No universal nine-slice wrapper or content crop needed
// (Campaign CH slice CH6a; the wrapper + 490px crop were compensations
// for importing the wrong 0x21000006 layout).
Chrome = RetailWindowChrome.Imported,
Left = 10f,
Top = 440f,
ContentWidth = 490f,
ContentHeight = root.Height,
RebaseContentLayout = true,
DatConstraintSource = controller.DatWindowInfo,
MinWidth = 200f,
// Bumping this resets any locally-persisted width/height captured
// under the old, wrong-layout mount (490px-cropped content, patched
// 9px height) to the newly authored 410x100 default on next load.
AuthoredGeometryRevision = 1,
ResizeX = true,
ResizeY = true,
// The imported 9px top Resizebar is deliberately removed by
// ChatWindowController. Its replacement top chrome is the move
// affordance; only the other three wrapper edges resize.
ResizableEdges = ResizeEdges.Left | ResizeEdges.Right | ResizeEdges.Bottom,
Opacity = 0.75f,
// All 4 edges + 4 corners resize via the authored Resizebar grips
// (UiRoot gives a directly-hit grip's own edges priority over this
// blanket mask); the default already covers every edge, and the
// plain top-STRIP correctly remains a move-only affordance because
// its own element is a Type-2 Dragbar, not a grip (research doc §2.1,
// §2.3 — the top edge authors NO Resizebar of its own; only its two
// corners do).
// Opacity: retail's whole-window alpha (ChatInterface::SetOpacity
// @0x004F3120) is CH6c's scope — UiRenderContext.AlphaMod currently has
// no draw-path consumer, so any value here is presentation-inert; leave
// the frame at the default 1f rather than assert a value with no effect.
Controller = controller,
StateController = controller,
});
controller.AttachWindow(handle);
Host.Root.DefaultTextInput = controller.Input;
Console.WriteLine("[D.2b] retail chat window from LayoutDesc importer (0x21000006).");
Console.WriteLine("[D.2b] retail chat window from LayoutDesc importer (0x2100006F).");
}
private void MountToolbar()