feat: add separate option to show imgui metrics

This commit is contained in:
goaaats 2021-10-07 20:01:13 +02:00
parent bc558fb425
commit 02719126f3
No known key found for this signature in database
GPG key ID: F18F057873895461

View file

@ -56,6 +56,7 @@ namespace Dalamud.Interface.Internal
#endif
private bool isImGuiDrawDemoWindow = false;
private bool isImGuiDrawMetricsWindow = false;
/// <summary>
/// Initializes a new instance of the <see cref="DalamudInterface"/> class.
@ -312,7 +313,10 @@ namespace Dalamud.Interface.Internal
this.WindowSystem.Draw();
if (this.isImGuiDrawDemoWindow)
ImGui.ShowDemoWindow();
ImGui.ShowDemoWindow(ref this.isImGuiDrawDemoWindow);
if (this.isImGuiDrawMetricsWindow)
ImGui.ShowMetricsWindow(ref this.isImGuiDrawMetricsWindow);
// Release focus of any ImGui window if we click into the game.
var io = ImGui.GetIO();
@ -484,6 +488,8 @@ namespace Dalamud.Interface.Internal
{
ImGui.MenuItem("Draw ImGui demo", string.Empty, ref this.isImGuiDrawDemoWindow);
ImGui.MenuItem("Draw metrics", string.Empty, ref this.isImGuiDrawMetricsWindow);
ImGui.Separator();
var val = ImGuiManagedAsserts.AssertsEnabled;