Currently crafted item can now be cancelled even when not near a fabrication station

This commit is contained in:
Liza 2024-03-28 14:36:20 +01:00
parent 6c040389ac
commit 9ae2785fae
Signed by: liza
GPG Key ID: 7199F8D727D55F67
2 changed files with 7 additions and 7 deletions

View File

@ -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();
}

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<Version>5.2</Version>
<Version>5.3</Version>
<LangVersion>11.0</LangVersion>
<Nullable>enable</Nullable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>