forked from liza/Deliveroo
Fix drag drop logic
This commit is contained in:
parent
7c9f7e01bc
commit
b4606c34d3
@ -94,17 +94,20 @@ internal sealed class ConfigWindow : Window
|
|||||||
ImGui.EndDragDropSource();
|
ImGui.EndDragDropSource();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui.BeginDragDropTarget() &&
|
if (ImGui.BeginDragDropTarget())
|
||||||
_dragDropSource > 0 &&
|
{
|
||||||
|
if (_dragDropSource > 0 &&
|
||||||
ImGui.AcceptDragDropPayload("DeliverooDragDrop").NativePtr != null)
|
ImGui.AcceptDragDropPayload("DeliverooDragDrop").NativePtr != null)
|
||||||
{
|
{
|
||||||
itemToAdd = _dragDropSource;
|
itemToAdd = _dragDropSource;
|
||||||
indexToAdd = i;
|
indexToAdd = i;
|
||||||
|
|
||||||
ImGui.EndDragDropTarget();
|
|
||||||
_dragDropSource = 0;
|
_dragDropSource = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui.EndDragDropTarget();
|
||||||
|
}
|
||||||
|
|
||||||
ImGui.OpenPopupOnItemClick($"###ctx{i}", ImGuiPopupFlags.MouseButtonRight);
|
ImGui.OpenPopupOnItemClick($"###ctx{i}", ImGuiPopupFlags.MouseButtonRight);
|
||||||
if (ImGui.BeginPopup($"###ctx{i}"))
|
if (ImGui.BeginPopup($"###ctx{i}"))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user