55 lines
1.9 KiB
C#
55 lines
1.9 KiB
C#
using System;
|
|
using System.Numerics;
|
|
using Dalamud.Interface.Windowing;
|
|
using ImGuiNET;
|
|
using QuestShare;
|
|
using QuestShare.Common;
|
|
|
|
namespace QuestShare.Windows.ConfigWindow;
|
|
|
|
public class ConfigWindow : Window, IDisposable
|
|
{
|
|
private ConfigurationManager Configuration { get; set; }
|
|
|
|
// We give this window a constant ID using ###
|
|
// This allows for labels being dynamic, like "{FPS Counter}fps###XYZ counter window",
|
|
// and the window ID will always be "###XYZ counter window" for ImGui
|
|
public ConfigWindow() : base(Plugin.Name + " Config###ConfigWindow")
|
|
{
|
|
Flags = ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoScrollbar |
|
|
ImGuiWindowFlags.NoScrollWithMouse;
|
|
|
|
Size = new Vector2(232, 90);
|
|
SizeCondition = ImGuiCond.Always;
|
|
|
|
Configuration = Plugin.Configuration;
|
|
}
|
|
|
|
public void Dispose() { }
|
|
|
|
public override void PreDraw()
|
|
{
|
|
}
|
|
|
|
public override void Draw()
|
|
{
|
|
var connectOnStartup = Configuration.Instance.ConnectOnStartup;
|
|
var resumeOnStartup = Configuration.Instance.ResumeOnStartup;
|
|
var autoShareMsq = Configuration.Instance.AutoShareMsq;
|
|
var autoShareNewQuests = Configuration.Instance.AutoShareNewQuests;
|
|
var BroadcastToParty = Configuration.Instance.BroadcastToParty;
|
|
|
|
ImGui.PushItemWidth(ImGui.GetWindowWidth() * 0.5f);
|
|
ImGui.Checkbox("Connect on startup", ref connectOnStartup);
|
|
ImGui.Checkbox("Resume on startup", ref resumeOnStartup);
|
|
ImGui.Checkbox("Auto share MSQ", ref autoShareMsq);
|
|
ImGui.Checkbox("Auto share new quests", ref autoShareNewQuests);
|
|
ImGui.Checkbox("Require party", ref BroadcastToParty);
|
|
if (ImGui.IsItemHovered())
|
|
{
|
|
ImGui.SetTooltip("Require joiners to be in your party. You do not have to be partied after others join your group.");
|
|
}
|
|
ImGui.PopItemWidth();
|
|
}
|
|
}
|