mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 05:04:15 +01:00
feat: add option to show dev bar at startup (#809)
This commit is contained in:
parent
90c4bb2b24
commit
9335ac4ec9
2 changed files with 13 additions and 1 deletions
|
|
@ -199,6 +199,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 the dev bar should open at startup.
|
||||||
|
/// </summary>
|
||||||
|
public bool DevBarOpenAtStartup { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether or not ImGui asserts should be enabled at startup.
|
/// Gets or sets a value indicating whether or not ImGui asserts should be enabled at startup.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,7 @@ namespace Dalamud.Interface.Internal
|
||||||
this.WindowSystem.AddWindow(this.fallbackFontNoticeWindow);
|
this.WindowSystem.AddWindow(this.fallbackFontNoticeWindow);
|
||||||
|
|
||||||
ImGuiManagedAsserts.AssertsEnabled = configuration.AssertsEnabledAtStartup;
|
ImGuiManagedAsserts.AssertsEnabled = configuration.AssertsEnabledAtStartup;
|
||||||
|
this.isImGuiDrawDevMenu = this.isImGuiDrawDevMenu || configuration.DevBarOpenAtStartup;
|
||||||
|
|
||||||
interfaceManager.Draw += this.OnDraw;
|
interfaceManager.Draw += this.OnDraw;
|
||||||
var dalamud = Service<Dalamud>.Get();
|
var dalamud = Service<Dalamud>.Get();
|
||||||
|
|
@ -433,7 +434,13 @@ namespace Dalamud.Interface.Internal
|
||||||
|
|
||||||
if (ImGui.BeginMenu("Dalamud"))
|
if (ImGui.BeginMenu("Dalamud"))
|
||||||
{
|
{
|
||||||
ImGui.MenuItem("Draw Dalamud dev menu", string.Empty, ref this.isImGuiDrawDevMenu);
|
ImGui.MenuItem("Draw dev menu", string.Empty, ref this.isImGuiDrawDevMenu);
|
||||||
|
var devBarAtStartup = configuration.DevBarOpenAtStartup;
|
||||||
|
if (ImGui.MenuItem("Draw dev menu at startup", string.Empty, ref devBarAtStartup))
|
||||||
|
{
|
||||||
|
configuration.DevBarOpenAtStartup ^= true;
|
||||||
|
configuration.Save();
|
||||||
|
}
|
||||||
|
|
||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue