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:
parent
5ad32d5753
commit
2dd5cb80d2
17 changed files with 264 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue