Disable minimizing/closing quest window if any quest is running

This commit is contained in:
Liza 2024-08-10 18:13:46 +02:00
parent 009ad85daa
commit d5e62ebc15
Signed by: liza
GPG Key ID: 7199F8D727D55F67
2 changed files with 12 additions and 4 deletions

View File

@ -1,5 +1,4 @@
using System;
using System.Globalization;
using System.Linq;
using System.Numerics;
using Dalamud.Game.Text;
@ -9,7 +8,6 @@ using Dalamud.Interface.Components;
using Dalamud.Interface.Utility.Raii;
using Dalamud.Plugin;
using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Application.Network.WorkDefinitions;
using ImGuiNET;
using Questionable.Controller;
using Questionable.Controller.Steps.Shared;

View File

@ -42,7 +42,7 @@ internal sealed class QuestWindow : LWindow, IPersistableWindowConfig
IFramework framework,
GameUiController gameUiController)
: base($"Questionable v{PluginVersion.ToString(2)}###Questionable",
ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.NoCollapse)
ImGuiWindowFlags.AlwaysAutoResize)
{
_pluginInterface = pluginInterface;
_questController = questController;
@ -92,7 +92,17 @@ internal sealed class QuestWindow : LWindow, IPersistableWindowConfig
public override void PreOpenCheck()
{
IsOpen |= _questController.IsRunning;
if (_questController.IsRunning)
{
IsOpen = true;
Flags |= ImGuiWindowFlags.NoCollapse;
ShowCloseButton = false;
}
else
{
Flags &= ~ImGuiWindowFlags.NoCollapse;
ShowCloseButton = true;
}
}
public override bool DrawConditions()