feat(ui): world-object hover tooltip — UIElement_SmartBoxWrapper::RecvNotice_SmartBoxObjectFound port
NOT the UI-element dwell-timer path. Retail's mechanism is UIElement_SmartBoxWrapper::RecvNotice_SmartBoxObjectFound @0x004E5AD0, fed every frame by FindObject @0x004E5430/Global_Loop @0x004E5620 using the current mouse position regardless of input focus. It fires IMMEDIATELY (no dwell wait) on the found-object id CHANGING, gated by the PlayerModule::ShowTooltips character option (already modeled in CharacterOptionTable, default true), with text ACCWeenieObject::GetObjectName(id, NAME_APPROPRIATE, 0) — the SAME name call as item tooltips, but WITHOUT the item-cell's separate stack-count prefix (a ground pile of arrows shows "Arrows", not "20 Arrows" — a real, decomp-confirmed asymmetry). Ported as RetailTooltipPresenter.UpdateWorldHoverTooltip, driven by the SAME world-hover pick CursorFeedbackController's own found-cursor already uses (WorldSelectionQuery.PickAtCursor, includeSelf: true — own player is included on that precedent) and the SAME ClientObjectTable-backed name resolver SocialAllegiancePageController's ResolveWorldObjectName already established as this codebase's pattern. New WorldTooltipRuntimeBindings threads it through RetailUiRuntimeBindings; wired at InteractionRetainedUiComposition alongside the existing cursorFeedback construction. Queried only when no UI element is hovered — a narrowing from retail's literal "raycast even under non-item UI chrome" (FindObject's m_pElementLastOver check), called out in the class's own doc note as a scoped interpretation rather than a byte-exact port. The exact popup skin is an inference, not a measured value: an exhaustive live-DAT sweep found UIElement_SmartBoxWrapper (class 0x10000030) has NO authored ElementDesc anywhere installed — unlike every other tooltip trigger, it is evidently constructed directly by gmGamePlayUI's own mode setup, not from a walkable LayoutDesc. This port reuses the same P0x47=0x10000395/P0x48=0x21000041 pair every other game-code SetTooltip caller in this family resolves to — the best-evidenced choice, called out in register row TS-85 rather than silently assumed exact. Live-verified against a connected ACE session (session-config launch, +Acdream): hovering a "Silver Tusker" near spawn mounted the correct popup text and simultaneously flipped the cursor to its DefaultFound variant, confirming the shared found-object pipeline drives both. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
e29c61a3a4
commit
fe1bc70753
5 changed files with 436 additions and 8 deletions
|
|
@ -842,6 +842,17 @@ internal sealed class RetailInteractionRetainedUiCompositionFactory
|
|||
d.Actions.Selection,
|
||||
text => d.Communication.AddText(text, RetailLogTextType.ClientLocal)),
|
||||
Cursor: new RetailUiCursorBindings(cursorFeedback, cursorManager),
|
||||
// #409 follow-on ("Item 2"): world-object hover tooltip.
|
||||
// Reuses the SAME world-hover pick cursorFeedback's own
|
||||
// worldTargetProvider already calls (UIElement_SmartBoxWrapper::
|
||||
// FindObject's 3D-raycast fallback — RetailWorldPicker's exact
|
||||
// port) and the SAME ClientObjectTable name resolver
|
||||
// ResolveWorldObjectName already uses elsewhere in this file.
|
||||
WorldTooltip: new WorldTooltipRuntimeBindings(
|
||||
HoverGuidAtCursor: () => late.Selection.PickAtCursor(includeSelf: true),
|
||||
ResolveName: guid => d.Inventory.Objects.Get(guid)?.GetAppropriateName(),
|
||||
Enabled: () => d.Character.Options.GetOptionBit(
|
||||
CharacterOptionId.ShowTooltips)),
|
||||
Confirmations: new ConfirmationRuntimeBindings(
|
||||
(type, context, accepted) =>
|
||||
late.Session.CurrentSession?.SendConfirmationResponse(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue