fix(ui): assess retained items on right click

Port UIElement_ItemList's physical-item right-click branch through the shared retained list. Select and appraise backpack, loot, paperdoll, and shortcut items through their canonical owners, while preventing RMB movement from lifting items or issuing appraisal requests.

Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-24 05:55:51 +02:00
parent 5ad32d5753
commit 2dd5cb80d2
17 changed files with 264 additions and 5 deletions

View file

@ -496,7 +496,10 @@ public sealed class UiRoot : UiElement
}
else
{
_dragCandidate = true;
// Retail item drag begins from left-button movement. A right-button
// press remains a complete-click candidate for ItemList appraisal;
// it must never lift or move an inventory item.
_dragCandidate = btn == UiMouseButton.Left;
}
// Dispatch raw MouseDown event (retail uses WM_LBUTTONDOWN = 0x201).
@ -594,7 +597,10 @@ public sealed class UiRoot : UiElement
_lastClickX = x;
_lastClickY = y;
}
else if (btn == UiMouseButton.Right && ContainsAbsolute(target, x, y))
else if (btn == UiMouseButton.Right
&& ContainsAbsolute(target, x, y)
&& Math.Abs(x - _pressX) <= DragDistanceThreshold
&& Math.Abs(y - _pressY) <= DragDistanceThreshold)
{
var click = new UiEvent(target.EventId, target, UiEventType.RightClick,
Data0: (int)flags);