mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-16 05:34:16 +01:00
feat: add config option for ImGui asserts
This commit is contained in:
parent
87655d51cb
commit
521efe2bd7
2 changed files with 12 additions and 1 deletions
|
|
@ -160,6 +160,11 @@ namespace Dalamud.Configuration.Internal
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool LogOpenAtStartup { get; set; }
|
public bool LogOpenAtStartup { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a value indicating whether or not ImGui asserts should be enabled at startup.
|
||||||
|
/// </summary>
|
||||||
|
public bool AssertsEnabledAtStartup { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether or not docking should be globally enabled in ImGui.
|
/// Gets or sets a value indicating whether or not docking should be globally enabled in ImGui.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ namespace Dalamud.Interface.Internal
|
||||||
this.WindowSystem.AddWindow(this.selfTestWindow);
|
this.WindowSystem.AddWindow(this.selfTestWindow);
|
||||||
this.WindowSystem.AddWindow(this.styleEditorWindow);
|
this.WindowSystem.AddWindow(this.styleEditorWindow);
|
||||||
|
|
||||||
ImGuiManagedAsserts.AssertsEnabled = true;
|
ImGuiManagedAsserts.AssertsEnabled = configuration.AssertsEnabledAtStartup;
|
||||||
|
|
||||||
Service<InterfaceManager>.Get().Draw += this.OnDraw;
|
Service<InterfaceManager>.Get().Draw += this.OnDraw;
|
||||||
}
|
}
|
||||||
|
|
@ -492,6 +492,12 @@ namespace Dalamud.Interface.Internal
|
||||||
ImGuiManagedAsserts.AssertsEnabled = val;
|
ImGuiManagedAsserts.AssertsEnabled = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ImGui.MenuItem("Enable asserts at startup", null, configuration.AssertsEnabledAtStartup))
|
||||||
|
{
|
||||||
|
configuration.AssertsEnabledAtStartup = !configuration.AssertsEnabledAtStartup;
|
||||||
|
configuration.Save();
|
||||||
|
}
|
||||||
|
|
||||||
if (ImGui.MenuItem("Clear focus"))
|
if (ImGui.MenuItem("Clear focus"))
|
||||||
{
|
{
|
||||||
ImGui.SetWindowFocus(null);
|
ImGui.SetWindowFocus(null);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue