feat: add dev bar info toggle (#805)

This commit is contained in:
kalilistic 2022-04-20 03:40:44 -04:00 committed by GitHub
parent a892933714
commit eca9fcce3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 6 deletions

View file

@ -311,6 +311,11 @@ namespace Dalamud.Configuration.Internal
/// </summary>
public bool IsMbCollect { get; set; } = true;
/// <summary>
/// Gets or sets a value indicating whether or not to show info on dev bar.
/// </summary>
public bool ShowDevBarInfo { get; set; } = true;
/// <summary>
/// Load a configuration from the provided path.
/// </summary>

View file

@ -622,6 +622,11 @@ namespace Dalamud.Interface.Internal
Log.Information(info);
}
if (ImGui.MenuItem("Show dev bar info", null, configuration.ShowDevBarInfo))
{
configuration.ShowDevBarInfo = !configuration.ShowDevBarInfo;
}
ImGui.EndMenu();
}
@ -739,14 +744,17 @@ namespace Dalamud.Interface.Internal
if (Service<GameGui>.Get().GameUiHidden)
ImGui.BeginMenu("UI is hidden...", false);
ImGui.PushFont(InterfaceManager.MonoFont);
if (configuration.ShowDevBarInfo)
{
ImGui.PushFont(InterfaceManager.MonoFont);
ImGui.BeginMenu(Util.GetGitHash(), false);
ImGui.BeginMenu(this.frameCount.ToString("000000"), false);
ImGui.BeginMenu(ImGui.GetIO().Framerate.ToString("000"), false);
ImGui.BeginMenu($"{Util.FormatBytes(GC.GetTotalMemory(false))}", false);
ImGui.BeginMenu(Util.GetGitHash(), false);
ImGui.BeginMenu(this.frameCount.ToString("000000"), false);
ImGui.BeginMenu(ImGui.GetIO().Framerate.ToString("000"), false);
ImGui.BeginMenu($"{Util.FormatBytes(GC.GetTotalMemory(false))}", false);
ImGui.PopFont();
ImGui.PopFont();
}
ImGui.EndMainMenuBar();
}