Allow workshop window to be minimized if not currently crafting

This commit is contained in:
Liza 2024-03-22 22:32:49 +01:00
parent b61de1f52c
commit eabefa6dc3
Signed by: liza
GPG Key ID: 7199F8D727D55F67
3 changed files with 8 additions and 2 deletions

View File

@ -61,7 +61,7 @@ internal sealed class MainWindow : LWindow
MaximumSize = new Vector2(500, 9999), MaximumSize = new Vector2(500, 9999),
}; };
Flags = ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.MenuBar; Flags = ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.MenuBar;
AllowClickthrough = false; AllowClickthrough = false;
} }

View File

@ -8,6 +8,7 @@ using Dalamud.Game.Command;
using Dalamud.Interface.Windowing; using Dalamud.Interface.Windowing;
using Dalamud.Plugin; using Dalamud.Plugin;
using Dalamud.Plugin.Services; using Dalamud.Plugin.Services;
using ImGuiNET;
using LLib; using LLib;
using Workshoppa.External; using Workshoppa.External;
using Workshoppa.GameData; using Workshoppa.GameData;
@ -107,6 +108,11 @@ public sealed partial class WorkshopPlugin : IDalamudPlugin
_pluginLog.Debug($"Changing stage from {_currentStageInternal} to {value}"); _pluginLog.Debug($"Changing stage from {_currentStageInternal} to {value}");
_currentStageInternal = value; _currentStageInternal = value;
} }
if (value != Stage.Stopped)
_mainWindow.Flags |= ImGuiWindowFlags.NoCollapse;
else
_mainWindow.Flags &= ~ImGuiWindowFlags.NoCollapse;
} }
} }

View File

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