fix(ui): select retained items on mouse down
Port UIElement_ListBox's press-time selection ordering through the shared retained item-list contract. Inventory, loot, paperdoll, and physical shortcuts now update canonical selection before release or drag promotion, while target-mode consumption suppresses drag and release-time activation. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
2dd5cb80d2
commit
043ab10b3c
18 changed files with 292 additions and 62 deletions
|
|
@ -176,7 +176,7 @@ public class PaperdollControllerTests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public void ClickEquippedItem_updatesSharedSelection()
|
||||
public void MouseDownEquippedItem_updatesSharedSelection()
|
||||
{
|
||||
var (layout, lists) = BuildLayout();
|
||||
var objects = new ClientObjectTable();
|
||||
|
|
@ -184,7 +184,8 @@ public class PaperdollControllerTests
|
|||
var selection = new SelectionState();
|
||||
Bind(layout, objects, selection: selection);
|
||||
|
||||
lists[HeadSlot].Cell.Clicked!();
|
||||
UiItemSlot cell = lists[HeadSlot].Cell;
|
||||
cell.OnEvent(new UiEvent(0u, cell, UiEventType.MouseDown));
|
||||
|
||||
Assert.Equal(0xA01u, selection.SelectedObjectId);
|
||||
Assert.True(lists[HeadSlot].Cell.Selected);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue