forked from liza/Questionable
Disable minimizing/closing quest window if any quest is running
This commit is contained in:
parent
009ad85daa
commit
d5e62ebc15
@ -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;
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user