fix(ui): select items before drag mesh
Port ItemList_BeginDrag's select-before-waiting order so a direct press-drag shows the selection indicator on its first frame across inventory, paperdoll, and toolbar item lists. Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
parent
64a056e656
commit
609ed8bfc2
10 changed files with 71 additions and 14 deletions
|
|
@ -283,9 +283,15 @@ public sealed class PaperdollController : IItemListDragHandler, IRetainedPanelCo
|
|||
}
|
||||
|
||||
// ── IItemListDragHandler ──────────────────────────────────────────────────────────────────────
|
||||
/// <summary>No-op: a wielded item stays put until the server confirms (same as the inventory grid,
|
||||
/// unlike the toolbar's remove-on-lift). Unwield happens on DROP onto the pack grid — InventoryController.</summary>
|
||||
public void OnDragLift(UiItemList sourceList, UiItemSlot sourceCell, ItemDragPayload payload) { }
|
||||
/// <summary>Selects the wielded item before the waiting mesh appears. The item itself stays put
|
||||
/// until the server confirms, like the inventory grid and unlike the toolbar's remove-on-lift.
|
||||
/// Unwield happens on DROP onto the pack grid — InventoryController.</summary>
|
||||
public void OnDragLift(UiItemList sourceList, UiItemSlot sourceCell, ItemDragPayload payload)
|
||||
{
|
||||
// UIElement_ItemList::ItemList_BeginDrag @ 0x004E32D0.
|
||||
if (payload.ObjId != 0 && _selection.SelectedObjectId != payload.ObjId)
|
||||
_selection.Select(payload.ObjId, SelectionChangeSource.Paperdoll);
|
||||
}
|
||||
|
||||
/// <summary>Accept iff the dragged item can be worn here (its ValidLocations intersects the slot mask).
|
||||
/// Retail: gmPaperDollUI::OnItemListDragOver (decomp 174302).</summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue