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:
Erik 2026-07-24 06:17:31 +02:00
parent 2dd5cb80d2
commit 043ab10b3c
18 changed files with 292 additions and 62 deletions

View file

@ -151,6 +151,13 @@ The separate retained ItemList path now does the same for occupied backpack,
side-bag, loot-container, paperdoll-slot, and physical shortcut cells; it
selects the item before entering the shared appraisal owner, and RMB movement
neither appraises nor lifts the item.
The adjacent input-latency correction ports
`UIElement_ListBox::MouseDown @ 0x0046E3A0`: physical retained items now update
canonical selection and their green frame on left-button down, before the
three-pixel drag threshold. Target mode is intercepted at that same press.
Bag opening, item use/equip, and shortcut activation remain completed
click/double-click actions, so a drag or target-consumed press cannot also
activate the item.
**Files:** `src/AcDream.Core.Net/Messages/AppraiseInfoParser.cs`;
`src/AcDream.App/UI/RetailUiRuntime.cs`;
@ -176,6 +183,8 @@ Right-clicking a visible world object opens the same examination window;
right-dragging the camera does not.
Right-clicking an occupied retained item cell selects and examines it without
using, equipping, looting, or dragging it.
Left-pressing one selects it before the button is released; holding and
dragging preserves that selection without activating the item.
The Black Phyntos Hive specifically reads `Value: ???`, `Burden: Unknown`,
then its description after one retail paragraph break, without the bogus
255-item/255-container line.

View file

@ -35,7 +35,10 @@ the configurable `SelectRight` action's retail release-completed gesture,
including drag cancellation, then reuses the canonical
picker/selection/appraisal path. The parallel retained ItemList branch now
selects and appraises occupied inventory, external-container, paperdoll, and
physical-shortcut cells through the same request owner. Slice 3's first connected gate exposed
physical-shortcut cells through the same request owner. Its shared physical
left-click contract now also matches retail's press-time selection: the
selection frame updates on MouseDown before drag promotion, while completed
click/double-click remains the activation boundary. Slice 3's first connected gate exposed
three deeper defects, now corrected: the response enum mislabeled ACE's
creature bit `0x0100` and dropped monster packets while retaining the busy
cursor; the imported 310 x 400 examination layout was incorrectly hosted as

View file

@ -104,6 +104,10 @@ instead of appraising the release point.
Retail's separate retained ItemList right-click branch now covers physical
backpack, loot, paperdoll, and toolbar item cells through the same selection
and appraisal owner.
The same shared ItemList contract now ports retail's left-button-down
selection timing across inventory, loot, paperdoll, and physical shortcuts:
selection is visible before release or drag promotion, while use/open/equip
remains release-completed.
Slice 3's first connected gate found and corrected the real remaining defects:
ACE creature flag `0x0100` was mislabeled as a weapon profile and left the
appraisal busy reference held, retail's examination UI had been mounted as a

View file

@ -222,9 +222,10 @@ present in the authored base name. Empty `AddItemInfo` calls are retained as
real report fragments, restoring retail's intentional blank rows after
workmanship, before armor level, around rating/special-property blocks, and at
the later use/item-level boundaries. Focused wire, projection, object-table,
title, and boots-layout fixtures protect the full path. The Release solution
build and 3,533 App tests / 3 skips plus 7,956 complete-solution tests /
5 skips pass; the connected boots comparison is the remaining visual gate.
title, and boots-layout fixtures protect the full path. With the subsequent
right-click and press-time retained-item input ports, the Release solution
build and 3,548 App tests / 3 skips plus 7,979 complete-solution tests /
5 skips pass.
The world right-click follow-up ports
`UIElement_SmartBoxWrapper::MouseUp @ 0x004E5820` and the
@ -241,6 +242,13 @@ The retained follow-up ports the separate
backpack, side-bag, loot, paperdoll-slot, or physical toolbar cell now selects
its item and enters that same appraisal owner on a completed right-click.
Right-button movement cancels the click and can never begin an item drag.
The input-latency follow-up ports `UIElement_ListBox::MouseDown @ 0x0046E3A0`
and the physical left-click branch of
`UIElement_ItemList::ListenToElementMessage @ 0x004E4D50`. Canonical selection
and the retained green frame update during left-button down, before the
three-pixel drag threshold. Target mode is offered first. Opening, using,
equipping, looting, and shortcut activation remain completed-click or
double-click actions and are suppressed when target mode consumed the press.
## Slice 1 — spell-bar overflow arrows

View file

@ -190,6 +190,52 @@ procedural arrow. The indicator is persistent selection presentation. Retail
also has a separate, short-lived click confirmation owned by SmartBox; it is not
implemented in `CPhysicsPart::Draw` or `ACCWeenieObject::SetSelected`.
## Retained physical-item press, activation, and drag ordering
`UIElement_ListBox::MouseDown @ 0x0046E3A0`
```text
on left mouse down over a single-selection ListBox:
item = GetItemUnderMouse()
if item exists:
SetSelectedItem(item, notify=true)
if drag-selection is enabled:
StartDragSelect()
```
`UIElement_ItemList::ListenToElementMessage @ 0x004E4D50`
```text
on the physical-item left-button-down notice:
item = UIItem under the mouse
if a target mode is active:
HandleTargetedUseLeftClick(item)
consume the notice
else if item.itemID != 0:
if this list uses single selection:
update the list selection
SetSelectedObject(item.itemID)
on the physical-item double-click notice:
if item.itemID != 0:
UseObject(item.itemID)
```
`gmPaperDollUI::ListenToElementMessage @ 0x004A5C30` uses the same ordering
for a worn item: target mode first, otherwise set the selected object on the
left-button-down notice; right-click selects and examines.
Therefore selection is not a completed-click action. The green selection frame
appears while the left button is still held, before the three-pixel drag
threshold can promote the press into a drag. Opening a bag, using/equipping an
item, and shortcut activation remain completed click or double-click actions,
so dragging never also activates the source. A target-mode-consumed press
suppresses the rest of that physical-item click gesture.
Acdream implements that split once in `UiItemList`/`UiItemSlot`. Inventory,
external-container loot, paperdoll equipment, and physical toolbar shortcuts
only supply their selection source and release-time activation command.
## Right-click selection and examination
`UIElement_SmartBoxWrapper::MouseUp @ 0x004E5820`