From 9ae2785fae81c6ab7e84ed1597875026e90cb03a Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Thu, 28 Mar 2024 14:36:20 +0100 Subject: [PATCH] Currently crafted item can now be cancelled even when not near a fabrication station --- Workshoppa/Windows/MainWindow.cs | 12 ++++++------ Workshoppa/Workshoppa.csproj | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Workshoppa/Windows/MainWindow.cs b/Workshoppa/Windows/MainWindow.cs index d4b4eb2..9628ff2 100644 --- a/Workshoppa/Windows/MainWindow.cs +++ b/Workshoppa/Windows/MainWindow.cs @@ -107,8 +107,7 @@ internal sealed class MainWindow : LWindow _checkInventory = !_checkInventory; ImGui.SameLine(); - ImGui.BeginDisabled(!NearFabricationStation); - ImGui.BeginDisabled(!IsDiscipleOfHand); + ImGui.BeginDisabled(!NearFabricationStation || !IsDiscipleOfHand); if (currentItem.StartedCrafting) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Play, "Resume")) @@ -129,7 +128,9 @@ internal sealed class MainWindow : LWindow ImGui.EndDisabled(); ImGui.SameLine(); - ImGui.BeginDisabled(!ImGui.GetIO().KeyCtrl); + + bool keysHeld = ImGui.GetIO().KeyCtrl && ImGui.GetIO().KeyShift; + ImGui.BeginDisabled(!keysHeld); if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Times, "Cancel")) { State = ButtonState.Pause; @@ -139,10 +140,9 @@ internal sealed class MainWindow : LWindow } ImGui.EndDisabled(); - if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled) && !ImGui.GetIO().KeyCtrl) + if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled) && !keysHeld) ImGui.SetTooltip( - $"Hold CTRL to remove this as craft. You have to manually use the fabrication station to cancel or finish this craft before you can continue using the queue."); - ImGui.EndDisabled(); + $"Hold CTRL+SHIFT to remove this as craft. You have to manually use the fabrication station to cancel or finish the workshop project before you can continue using the queue."); ShowErrorConditions(); } diff --git a/Workshoppa/Workshoppa.csproj b/Workshoppa/Workshoppa.csproj index 58f9431..5512134 100644 --- a/Workshoppa/Workshoppa.csproj +++ b/Workshoppa/Workshoppa.csproj @@ -1,7 +1,7 @@ net8.0-windows - 5.2 + 5.3 11.0 enable true