mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
feat: add "plugin testing" settings to /xlsettings
This commit is contained in:
parent
7ae3a92968
commit
cf08eaee87
6 changed files with 55 additions and 9 deletions
|
|
@ -9,7 +9,7 @@ using Newtonsoft.Json;
|
|||
namespace Dalamud
|
||||
{
|
||||
[Serializable]
|
||||
public class DalamudConfiguration
|
||||
internal class DalamudConfiguration
|
||||
{
|
||||
public DiscordFeatureConfiguration DiscordFeatureConfig { get; set; }
|
||||
|
||||
|
|
@ -36,6 +36,9 @@ namespace Dalamud
|
|||
|
||||
public XivChatType GeneralChatType { get; set; } = XivChatType.Debug;
|
||||
|
||||
public bool DoPluginTest { get; set; } = false;
|
||||
public bool DoDalamudTest { get; set; } = false;
|
||||
|
||||
[JsonIgnore]
|
||||
public string ConfigPath;
|
||||
|
||||
|
|
|
|||
|
|
@ -59,11 +59,11 @@ namespace Dalamud {
|
|||
public readonly DalamudStartInfo StartInfo;
|
||||
private readonly LoggingLevelSwitch loggingLevelSwitch;
|
||||
|
||||
public readonly DalamudConfiguration Configuration;
|
||||
internal readonly DalamudConfiguration Configuration;
|
||||
|
||||
private readonly WinSockHandlers WinSock2;
|
||||
|
||||
public InterfaceManager InterfaceManager { get; private set; }
|
||||
internal InterfaceManager InterfaceManager { get; private set; }
|
||||
|
||||
public DataManager Data { get; private set; }
|
||||
|
||||
|
|
@ -507,14 +507,13 @@ namespace Dalamud {
|
|||
|
||||
this.CommandManager.AddHandler("/xlsettings", new CommandInfo(OnOpenSettingsCommand)
|
||||
{
|
||||
HelpMessage = Loc.Localize("DalamudSettingsHelp", "Change various In-Game-Addon settings like chat channels and the discord bot setup."),
|
||||
ShowInHelp = false // Not quite ready yet
|
||||
HelpMessage = Loc.Localize("DalamudSettingsHelp", "Change various In-Game-Addon settings like chat channels and the discord bot setup.")
|
||||
});
|
||||
|
||||
this.CommandManager.AddHandler("/xlbugreport", new CommandInfo(OnBugReportCommand)
|
||||
{
|
||||
HelpMessage = Loc.Localize("DalamudBugReport", "Upload a log to be analyzed by our professional development team."),
|
||||
ShowInHelp = false // Not quite ready yet
|
||||
ShowInHelp = false
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,11 @@ namespace Dalamud.Interface
|
|||
|
||||
this.chatTypes = Enum.GetValues(typeof(XivChatType)).Cast<XivChatType>().Select(x => x.ToString()).ToArray();
|
||||
this.dalamudMessagesChatType = (int) this.dalamud.Configuration.GeneralChatType;
|
||||
|
||||
this.doCfTaskBarFlash = this.dalamud.Configuration.DutyFinderTaskbarFlash;
|
||||
|
||||
this.doPluginTest = this.dalamud.Configuration.DoPluginTest;
|
||||
this.doDalamudTest = this.dalamud.Configuration.DoDalamudTest;
|
||||
}
|
||||
|
||||
private string[] chatTypes;
|
||||
|
|
@ -33,6 +38,15 @@ namespace Dalamud.Interface
|
|||
|
||||
private int dalamudMessagesChatType;
|
||||
|
||||
private bool doCfTaskBarFlash;
|
||||
|
||||
#region Experimental
|
||||
|
||||
private bool doPluginTest;
|
||||
private bool doDalamudTest;
|
||||
|
||||
#endregion
|
||||
|
||||
public bool Draw() {
|
||||
ImGui.SetNextWindowSize(new Vector2(500, 500), ImGuiCond.Always);
|
||||
|
||||
|
|
@ -51,7 +65,31 @@ namespace Dalamud.Interface
|
|||
ImGui.Combo("##XlChatTypeCombo", ref this.dalamudMessagesChatType, this.chatTypes,
|
||||
this.chatTypes.Length);
|
||||
ImGui.TextColored(this.hintTextColor, "Select the chat channel that is to be used for general XIVLauncher messages.");
|
||||
|
||||
ImGui.Dummy(new Vector2(5f, 5f));
|
||||
|
||||
ImGui.Checkbox("Flash FFXIV window on duty pop", ref this.doCfTaskBarFlash);
|
||||
ImGui.TextColored(this.hintTextColor, "Select, if the FFXIV window should be flashed in your task bar when a duty is ready.");
|
||||
|
||||
ImGui.EndTabItem();
|
||||
}
|
||||
|
||||
if (ImGui.BeginTabItem("Experimental"))
|
||||
{
|
||||
ImGui.Text("All of these settings require a restart of the game to take effect.");
|
||||
|
||||
ImGui.Dummy(new Vector2(10f, 10f));
|
||||
|
||||
ImGui.Checkbox("Get plugin testing builds", ref this.doPluginTest);
|
||||
ImGui.TextColored(this.hintTextColor, "Check this box to receive testing prereleases for plugins.");
|
||||
|
||||
ImGui.Checkbox("Get Dalamud testing builds", ref this.doDalamudTest);
|
||||
ImGui.TextColored(this.hintTextColor, "Check this box to receive testing prereleases for Dalamud.");
|
||||
|
||||
ImGui.EndTabItem();
|
||||
}
|
||||
|
||||
ImGui.EndTabBar();
|
||||
}
|
||||
|
||||
ImGui.EndChild();
|
||||
|
|
@ -73,6 +111,12 @@ namespace Dalamud.Interface
|
|||
|
||||
private void Save() {
|
||||
this.dalamud.Configuration.GeneralChatType = (XivChatType) this.dalamudMessagesChatType;
|
||||
|
||||
this.dalamud.Configuration.DutyFinderTaskbarFlash = this.doCfTaskBarFlash;
|
||||
|
||||
this.dalamud.Configuration.DoPluginTest = this.doPluginTest;
|
||||
this.dalamud.Configuration.DoDalamudTest = this.doDalamudTest;
|
||||
|
||||
this.dalamud.Configuration.Save();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ using Serilog;
|
|||
|
||||
namespace Dalamud.Interface
|
||||
{
|
||||
public class InterfaceManager : IDisposable
|
||||
internal class InterfaceManager : IDisposable
|
||||
{
|
||||
[UnmanagedFunctionPointer(CallingConvention.ThisCall)]
|
||||
private delegate IntPtr PresentDelegate(IntPtr swapChain, uint syncInterval, uint presentFlags);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ using Serilog.Events;
|
|||
|
||||
namespace Dalamud.Interface
|
||||
{
|
||||
public class SerilogEventSink : ILogEventSink
|
||||
internal class SerilogEventSink : ILogEventSink
|
||||
{
|
||||
private readonly IFormatProvider _formatProvider;
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ namespace Dalamud.Interface
|
|||
/// </summary>
|
||||
/// <param name="interfaceManager">The interface manager to register on.</param>
|
||||
/// <param name="namespaceName">The plugin namespace.</param>
|
||||
public UiBuilder(InterfaceManager interfaceManager, string namespaceName) {
|
||||
internal UiBuilder(InterfaceManager interfaceManager, string namespaceName) {
|
||||
this.namespaceName = namespaceName;
|
||||
|
||||
this.interfaceManager = interfaceManager;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue