fix(ui): night-round review — F9/F10/F12 register + structure riders
F9: filed register row AD-108 for MapPageController.ResolveSwallowedIcon — the standalone re-import of the Map tab's player/house icons, which m_pMap's own Type-1 UiButton authoring swallows as dat children (UiButton.ConsumesDatChildren). This adaptation was implemented but never had a register row. F10: extracted the popup-locator pair (0x10000395/0x21000041), previously duplicated as three separately-cited private constants across UiItemSlot.cs, RetailTooltipPresenter.cs, and MapPageController.cs, into ONE public pair on RetailTooltipPresenter (SharedPopupSkinRootElementId/SharedPopupSkinLayoutDid) with a single canonical citation. The other two sites now reference it instead of carrying their own copy. F12: fixed TS-85's SetTooltip-site arithmetic. The register (and a mirrored ISSUES.md log entry) claimed "15 known sites, all accounted for" — recounting the row's own enumerated list finds 17 distinct sites (the tally had dropped gmPaperDollUI::UpdateItemSlotTooltip @0x004A52EF and undercounted by one more), of which 16 are ported and one — UIElement_Text::RecalculateTruncation @0x00466F80, the headline highest-volume site sub-mechanism (1) itself named as deliberately deferred — was never actually closed. The "all 15 accounted for" close was wrong twice over: wrong count, and a site the row's own text already scoped as open. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
df062d2eda
commit
c403f57815
6 changed files with 64 additions and 49 deletions
|
|
@ -495,7 +495,11 @@ NAME, `"%d %s"`-prefixed when the stack is > 1), which stays deferred: acdream's
|
||||||
`UiItemSlot` is constructed programmatically at 6+ sites and carries neither the
|
`UiItemSlot` is constructed programmatically at 6+ sites and carries neither the
|
||||||
`P0x47` popup locator nor a name source, so porting it is its own slice, not a
|
`P0x47` popup locator nor a name source, so porting it is its own slice, not a
|
||||||
one-line seam. Register TS-85 is narrowed accordingly and now enumerates all 15
|
one-line seam. Register TS-85 is narrowed accordingly and now enumerates all 15
|
||||||
`SetTooltip` call sites split into ported / no-acdream-analog.
|
`SetTooltip` call sites split into ported / no-acdream-analog. **[F12 correction,
|
||||||
|
night-round review, 2026-08-17: this was actually 17 sites, not 15 — the count
|
||||||
|
dropped `gmPaperDollUI::UpdateItemSlotTooltip @0x004A52EF` and undercounted by
|
||||||
|
one more besides; see register row TS-85's own current text for the corrected
|
||||||
|
17-site (16 ported + `RecalculateTruncation` open) tally.]**
|
||||||
|
|
||||||
**2026-08-16 review-fix round (F1-F11), same day.** An Opus review of the
|
**2026-08-16 review-fix round (F1-F11), same day.** An Opus review of the
|
||||||
port above returned architectural PASS-with-findings / retail-fidelity FAIL
|
port above returned architectural PASS-with-findings / retail-fidelity FAIL
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -200,22 +200,6 @@ public sealed class MapPageController
|
||||||
return lines;
|
return lines;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Live-DAT-confirmed 2026-08-17: the SAME shared popup skin
|
|
||||||
/// <see cref="UiItemSlot"/> hardcodes for its own runtime-text tooltips
|
|
||||||
/// (its own class doc has the full "one of the four popup skins
|
|
||||||
/// RetailTooltipPresenter already mounts" citation). The map-note
|
|
||||||
/// template (<c>0x100001F0</c>) authors no individual tooltip-popup
|
|
||||||
/// locator of its own (a plain 10x10 hotspot dot), so
|
|
||||||
/// <c>RetailTooltipPresenter.OnTooltipShow</c>'s unconditional
|
|
||||||
/// <c>AuthoredTooltipRootElementId == 0 -> return</c> guard needs one
|
|
||||||
/// supplied — reusing the item catalog's proven-working skin is the
|
|
||||||
/// same "best-evidenced inference, not a measured retail value" shape
|
|
||||||
/// TS-85's own <c>UpdateWorldHoverTooltip</c> fallback already uses.
|
|
||||||
/// </summary>
|
|
||||||
private const uint MarkerTooltipRootElementId = 0x10000395u;
|
|
||||||
private const uint MarkerTooltipLayoutDid = 0x21000041u;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Instantiates the 53 static town hotspots (<c>gmMapUI::AddMapNote</c>)
|
/// Instantiates the 53 static town hotspots (<c>gmMapUI::AddMapNote</c>)
|
||||||
/// from <c>m_pMap</c>'s own <c>0x47</c>/<c>0x48</c> template attrs. A
|
/// from <c>m_pMap</c>'s own <c>0x47</c>/<c>0x48</c> template attrs. A
|
||||||
|
|
@ -250,11 +234,17 @@ public sealed class MapPageController
|
||||||
// authored text (closes register row TS-85's last item,
|
// authored text (closes register row TS-85's last item,
|
||||||
// gmMapUI::AddMapNote @0x004A1C51). AuthoredTooltipRootElementId/
|
// gmMapUI::AddMapNote @0x004A1C51). AuthoredTooltipRootElementId/
|
||||||
// LayoutDid still gate the popup SKIN unconditionally even on
|
// LayoutDid still gate the popup SKIN unconditionally even on
|
||||||
// the runtime-text path — see MarkerTooltipRootElementId's doc.
|
// the runtime-text path — the map-note template (0x100001F0)
|
||||||
|
// authors no individual tooltip-popup locator of its own (a
|
||||||
|
// plain 10x10 hotspot dot), so RetailTooltipPresenter's popup
|
||||||
|
// needs one supplied; RetailTooltipPresenter.SharedPopupSkinRootElementId/
|
||||||
|
// SharedPopupSkinLayoutDid (see that class's own single
|
||||||
|
// canonical citation, night-round review F10) is the same
|
||||||
|
// proven-working skin UiItemSlot already hardcodes.
|
||||||
if (marker is UiButton markerButton)
|
if (marker is UiButton markerButton)
|
||||||
markerButton.TooltipText = loc.Name;
|
markerButton.TooltipText = loc.Name;
|
||||||
marker.AuthoredTooltipRootElementId = MarkerTooltipRootElementId;
|
marker.AuthoredTooltipRootElementId = RetailTooltipPresenter.SharedPopupSkinRootElementId;
|
||||||
marker.AuthoredTooltipLayoutDid = MarkerTooltipLayoutDid;
|
marker.AuthoredTooltipLayoutDid = RetailTooltipPresenter.SharedPopupSkinLayoutDid;
|
||||||
_map!.AddChild(marker);
|
_map!.AddChild(marker);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -320,17 +320,39 @@ public sealed class RetailTooltipPresenter : IDisposable
|
||||||
// directly by gmGamePlayUI's own mode setup rather than from a
|
// directly by gmGamePlayUI's own mode setup rather than from a
|
||||||
// walkable authored ElementDesc, so its own P0x47/P0x48 cannot be
|
// walkable authored ElementDesc, so its own P0x47/P0x48 cannot be
|
||||||
// read from the DAT. This port therefore REUSES the item catalog's
|
// read from the DAT. This port therefore REUSES the item catalog's
|
||||||
// confirmed uniform popup-locator pair (WorldPopupRootElementId/
|
// confirmed uniform popup-locator pair (SharedPopupSkinRootElementId/
|
||||||
// WorldPopupLayoutDid below) — the SAME "generic runtime-text" skin
|
// SharedPopupSkinLayoutDid below) — the SAME "generic runtime-text"
|
||||||
// every other game-code SetTooltip caller in this family draws from —
|
// skin every other game-code SetTooltip caller in this family draws
|
||||||
// as the best-evidenced inference for the unrecoverable constant.
|
// from — as the best-evidenced inference for the unrecoverable
|
||||||
|
// constant.
|
||||||
|
|
||||||
/// <summary>Same popup skin every UIItem prototype resolves to
|
/// <summary>
|
||||||
/// (<see cref="UiItemSlot"/>'s own <c>ItemTooltipRootElementId</c>) —
|
/// The shared popup-skin locator pair every tooltip-bearing surface
|
||||||
/// see this section's own doc note on why the exact value cannot be
|
/// that authors no locator of its own resolves to. Retail's shared
|
||||||
/// read off an authored <c>UIElement_SmartBoxWrapper</c> ElementDesc.</summary>
|
/// UIItem cell-template catalog (<c>ItemListCellTemplate.CatalogLayoutId</c>,
|
||||||
private const uint WorldPopupRootElementId = 0x10000395u;
|
/// LayoutDesc <c>0x21000041</c>) authors the SAME
|
||||||
private const uint WorldPopupLayoutDid = 0x21000041u;
|
/// <c>P0x47=0x10000395</c>/<c>P0x48=0x21000041</c> pair on all 49 of
|
||||||
|
/// its standalone item-cell prototypes (live-DAT-probed 2026-08-16:
|
||||||
|
/// inventory's 32x32 cell, the toolbar's per-slot prototypes, the
|
||||||
|
/// container cell, every paperdoll/armor slot skin —
|
||||||
|
/// <c>TooltipLiveDatTests.PopupSkinRootIds</c>/
|
||||||
|
/// <c>UiItemCatalog_EveryPrototype_SharesTheSamePopupLocator</c>) —
|
||||||
|
/// one of the four 30x30 popup skins this presenter mounts for every
|
||||||
|
/// authored tooltip-bearing element too.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Night-round review F10: previously duplicated as three separate
|
||||||
|
/// private constants with three separate partial citations — this
|
||||||
|
/// class's own world-hover popup (below), <c>UiItemSlot</c>'s item-cell
|
||||||
|
/// popup, and <c>MapPageController</c>'s town-marker popup. All three
|
||||||
|
/// consumers now reference these SAME two constants; this is the ONE
|
||||||
|
/// citation. This class is the natural owner since it's the mount
|
||||||
|
/// point every one of the three consumers ultimately routes through
|
||||||
|
/// (<c>OnTooltipShow</c>/<c>UpdateWorldHoverTooltip</c> both call
|
||||||
|
/// <c>TryBuildAndMountPopup</c> with these values or a widget's own).
|
||||||
|
/// </remarks>
|
||||||
|
public const uint SharedPopupSkinRootElementId = 0x10000395u;
|
||||||
|
public const uint SharedPopupSkinLayoutDid = 0x21000041u;
|
||||||
|
|
||||||
private uint _worldHoverGuid;
|
private uint _worldHoverGuid;
|
||||||
private bool _worldTooltipShowing;
|
private bool _worldTooltipShowing;
|
||||||
|
|
@ -406,7 +428,7 @@ public sealed class RetailTooltipPresenter : IDisposable
|
||||||
// A UI-element popup cannot be showing here: UiRoot's own hover
|
// A UI-element popup cannot be showing here: UiRoot's own hover
|
||||||
// (queried above) is null whenever this branch runs, so its dwell
|
// (queried above) is null whenever this branch runs, so its dwell
|
||||||
// timer never arms and OnTooltipShow never fires concurrently.
|
// timer never arms and OnTooltipShow never fires concurrently.
|
||||||
if (TryBuildAndMountPopup(WorldPopupRootElementId, WorldPopupLayoutDid, text))
|
if (TryBuildAndMountPopup(SharedPopupSkinRootElementId, SharedPopupSkinLayoutDid, text))
|
||||||
_worldTooltipShowing = true;
|
_worldTooltipShowing = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,25 +19,23 @@ public class UiItemSlot : UiElement
|
||||||
/// live-DAT-probed 2026-08-16: every top-level catalog child (inventory's
|
/// live-DAT-probed 2026-08-16: every top-level catalog child (inventory's
|
||||||
/// 32x32 cell <c>0x1000033A</c>, the toolbar's per-slot prototypes
|
/// 32x32 cell <c>0x1000033A</c>, the toolbar's per-slot prototypes
|
||||||
/// <c>0x1000043B</c>.., the container cell <c>0x1000033F</c>, and every
|
/// <c>0x1000043B</c>.., the container cell <c>0x1000033F</c>, and every
|
||||||
/// paperdoll/armor slot skin alike) resolves <c>P0x47=0x10000395</c> /
|
/// paperdoll/armor slot skin alike) resolves through catalog inheritance
|
||||||
/// <c>P0x48=0x21000041</c> through catalog inheritance, matching one of
|
/// to <see cref="Layout.RetailTooltipPresenter.SharedPopupSkinRootElementId"/>/
|
||||||
/// the four popup skins <see cref="Layout.RetailTooltipPresenter"/> already
|
/// <see cref="Layout.RetailTooltipPresenter.SharedPopupSkinLayoutDid"/> —
|
||||||
/// mounts for every other tooltip-bearing element
|
/// see that class for the single canonical citation (night-round review
|
||||||
/// (<c>Layout.TooltipLiveDatTests.PopupSkinRootIds</c>). Since
|
/// F10 consolidated what used to be three separately-cited copies of the
|
||||||
/// <see cref="UiItemSlot"/> cells are built programmatically (never through
|
/// same pair into one). Since <see cref="UiItemSlot"/> cells are built
|
||||||
/// <c>LayoutImporter.Build</c>), this port hardcodes the uniform pair here
|
/// programmatically (never through <c>LayoutImporter.Build</c>), this
|
||||||
/// rather than re-deriving it per instance — the same "exhaustive scan,
|
/// port hardcodes the uniform pair here rather than re-deriving it per
|
||||||
/// then hardcode" shape as <c>RetailCursorCatalog</c>'s five window-control
|
/// instance — the same "exhaustive scan, then hardcode" shape as
|
||||||
/// cursor DIDs and <c>ItemListCellTemplate.CatalogLayoutId</c> itself.
|
/// <c>RetailCursorCatalog</c>'s five window-control cursor DIDs and
|
||||||
|
/// <c>ItemListCellTemplate.CatalogLayoutId</c> itself.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private const uint ItemTooltipRootElementId = 0x10000395u;
|
|
||||||
private const uint ItemTooltipLayoutDid = 0x21000041u;
|
|
||||||
|
|
||||||
public UiItemSlot()
|
public UiItemSlot()
|
||||||
{
|
{
|
||||||
ClickThrough = false;
|
ClickThrough = false;
|
||||||
AuthoredTooltipRootElementId = ItemTooltipRootElementId;
|
AuthoredTooltipRootElementId = Layout.RetailTooltipPresenter.SharedPopupSkinRootElementId;
|
||||||
AuthoredTooltipLayoutDid = ItemTooltipLayoutDid;
|
AuthoredTooltipLayoutDid = Layout.RetailTooltipPresenter.SharedPopupSkinLayoutDid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool ConsumesDatChildren => true;
|
public override bool ConsumesDatChildren => true;
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,7 @@ public sealed class MapHousePanelControllerTests
|
||||||
// GetTooltipText()) — the retail SetTooltip/m_TTText mechanism, NOT
|
// GetTooltipText()) — the retail SetTooltip/m_TTText mechanism, NOT
|
||||||
// the DAT-authored AuthoredTooltipText path. The popup-skin locator
|
// the DAT-authored AuthoredTooltipText path. The popup-skin locator
|
||||||
// is unconditionally required even on the runtime-text path (see
|
// is unconditionally required even on the runtime-text path (see
|
||||||
// MapPageController.MarkerTooltipRootElementId's doc).
|
// RetailTooltipPresenter.SharedPopupSkinRootElementId's doc).
|
||||||
Assert.All(townMarkers, c => Assert.NotEqual(0u, c.AuthoredTooltipRootElementId));
|
Assert.All(townMarkers, c => Assert.NotEqual(0u, c.AuthoredTooltipRootElementId));
|
||||||
Assert.All(townMarkers, c => Assert.NotEqual(0u, c.AuthoredTooltipLayoutDid));
|
Assert.All(townMarkers, c => Assert.NotEqual(0u, c.AuthoredTooltipLayoutDid));
|
||||||
Assert.All(townMarkers, c => Assert.IsType<UiButton>(c));
|
Assert.All(townMarkers, c => Assert.IsType<UiButton>(c));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue