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
|
|
@ -757,9 +757,12 @@ public sealed class UiRoot : UiElement
|
|||
DragSource = source;
|
||||
DragPayload = payload;
|
||||
_dragGhost = source.GetDragGhost(); // snapshot NOW — the DragBegin handler may empty the source cell
|
||||
source.SetDragSourceActive(true, payload);
|
||||
var e = new UiEvent(source.EventId, source, UiEventType.DragBegin, Payload: payload);
|
||||
source.OnEvent(in e);
|
||||
// Retail UIElement_ItemList::ItemList_BeginDrag @ 0x004E32D0 selects an
|
||||
// unselected item before enabling its waiting mesh. Keep that order so a
|
||||
// press-drag shows the selection indicator on its very first frame.
|
||||
source.SetDragSourceActive(true, payload);
|
||||
}
|
||||
|
||||
private void UpdateDragHover(int x, int y)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue