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
|
|
@ -81,6 +81,23 @@ public class PaperdollControllerTests
|
|||
Assert.True(lists[HeadSlot].Cell.Selected);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DragLift_selectsEquippedItem_beforeWaitingVisual()
|
||||
{
|
||||
var (layout, lists) = BuildLayout();
|
||||
var objects = new ClientObjectTable();
|
||||
SeedEquipped(objects, 0xA01u, EquipMask.HeadWear);
|
||||
var selection = new SelectionState();
|
||||
var ctrl = Bind(layout, objects, selection: selection);
|
||||
var cell = lists[HeadSlot].Cell;
|
||||
var payload = new ItemDragPayload(0xA01u, ItemDragSource.Equipment, 0, cell);
|
||||
|
||||
ctrl.OnDragLift(lists[HeadSlot], cell, payload);
|
||||
|
||||
Assert.Equal(0xA01u, selection.SelectedObjectId);
|
||||
Assert.True(cell.Selected);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Populate_matches_a_weapon_into_the_composite_slot()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue