48 lines
1.3 KiB
C#
48 lines
1.3 KiB
C#
using System.Numerics;
|
|
using Dalamud.Bindings.ImGui;
|
|
using Dalamud.Interface.Windowing;
|
|
using Dalamud.Plugin;
|
|
using LLib.ImGui;
|
|
using Questionable.Windows.QuestComponents;
|
|
|
|
namespace Questionable.Windows;
|
|
|
|
internal sealed class QuestValidationWindow : LWindow, IPersistableWindowConfig
|
|
{
|
|
private readonly IDalamudPluginInterface _pluginInterface;
|
|
|
|
private readonly Configuration _configuration;
|
|
|
|
private readonly QuestValidationComponent _questValidationComponent;
|
|
|
|
public WindowConfig WindowConfig => _configuration.QuestValidationWindowConfig;
|
|
|
|
public QuestValidationWindow(QuestValidationComponent questValidationComponent, IDalamudPluginInterface pluginInterface, Configuration configuration)
|
|
: base("Quest Validation###QuestionableValidator")
|
|
{
|
|
_questValidationComponent = questValidationComponent;
|
|
_pluginInterface = pluginInterface;
|
|
_configuration = configuration;
|
|
base.Size = new Vector2(800f, 400f);
|
|
base.SizeCondition = ImGuiCond.FirstUseEver;
|
|
base.SizeConstraints = new WindowSizeConstraints
|
|
{
|
|
MinimumSize = new Vector2(600f, 300f)
|
|
};
|
|
}
|
|
|
|
public void SaveWindowConfig()
|
|
{
|
|
_pluginInterface.SavePluginConfig(_configuration);
|
|
}
|
|
|
|
public override bool DrawConditions()
|
|
{
|
|
return _questValidationComponent.ShouldDraw;
|
|
}
|
|
|
|
public override void DrawContent()
|
|
{
|
|
_questValidationComponent.Draw();
|
|
}
|
|
}
|