From 2ab7ae3c061d8e588d136384613681058af178cc Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Wed, 17 Jul 2024 02:50:40 +0200 Subject: [PATCH] Fix right-click menu for 'items for auto-buy' --- Deliveroo/Deliveroo.csproj | 2 +- Deliveroo/Windows/ConfigWindow.cs | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Deliveroo/Deliveroo.csproj b/Deliveroo/Deliveroo.csproj index 4759985..7022df1 100644 --- a/Deliveroo/Deliveroo.csproj +++ b/Deliveroo/Deliveroo.csproj @@ -1,6 +1,6 @@ - 5.1 + 5.2 dist diff --git a/Deliveroo/Windows/ConfigWindow.cs b/Deliveroo/Windows/ConfigWindow.cs index 643bc03..24b55ec 100644 --- a/Deliveroo/Windows/ConfigWindow.cs +++ b/Deliveroo/Windows/ConfigWindow.cs @@ -117,15 +117,6 @@ internal sealed class ConfigWindow : LWindow, IPersistableWindowConfig ImGui.Selectable($"{item.Name}{(item.Limited ? $" {SeIconChar.Hyadelyn.ToIconString()}" : "")}", false, ImGuiSelectableFlags.SpanAllColumns); - if (wrap != null) - { - ImGui.SameLine(0, 0); - ImGui.SetCursorPos(pos); - ImGui.Image(wrap.ImGuiHandle, iconSize); - } - - wrap?.Dispose(); - if (ImGui.BeginDragDropSource()) { ImGui.SetDragDropPayload("DeliverooDragDrop", nint.Zero, 0); @@ -157,6 +148,15 @@ internal sealed class ConfigWindow : LWindow, IPersistableWindowConfig ImGui.EndPopup(); } + if (wrap != null) + { + ImGui.SameLine(0, 0); + ImGui.SetCursorPos(pos); + ImGui.Image(wrap.ImGuiHandle, iconSize); + + wrap.Dispose(); + } + ImGui.EndDisabled(); ImGui.PopID(); }