feat: add 'Enable Asserts' menu item

This commit is contained in:
goat 2021-08-12 19:35:18 +02:00
parent ad1aa8d5eb
commit 24ed0d3aa9
No known key found for this signature in database
GPG key ID: F18F057873895461
2 changed files with 15 additions and 5 deletions

View file

@ -12,6 +12,7 @@ using Dalamud.Logging.Internal;
using Dalamud.Plugin.Internal;
using Dalamud.Utility;
using ImGuiNET;
using ImGuiScene.ManagedAsserts;
using Serilog.Events;
namespace Dalamud.Interface.Internal
@ -87,6 +88,8 @@ namespace Dalamud.Interface.Internal
this.windowSystem.AddWindow(this.settingsWindow);
this.windowSystem.AddWindow(this.selfTestWindow);
ImGuiManagedAsserts.EnableAsserts = true;
this.dalamud.InterfaceManager.Draw += this.OnDraw;
Log.Information("Windows added");
@ -426,10 +429,6 @@ namespace Dalamud.Interface.Internal
ImGui.Separator();
ImGui.MenuItem("Draw ImGui demo", string.Empty, ref this.isImGuiDrawDemoWindow);
ImGui.Separator();
if (ImGui.MenuItem("Unload Dalamud"))
{
this.dalamud.Unload();
@ -458,6 +457,17 @@ namespace Dalamud.Interface.Internal
ImGui.EndMenu();
}
if (ImGui.BeginMenu("GUI"))
{
ImGui.MenuItem("Draw ImGui demo", string.Empty, ref this.isImGuiDrawDemoWindow);
ImGui.Separator();
ImGui.MenuItem("Enable Asserts", string.Empty, ref ImGuiManagedAsserts.EnableAsserts);
ImGui.EndMenu();
}
if (ImGui.BeginMenu("Game"))
{
if (ImGui.MenuItem("Replace ExceptionHandler"))

@ -1 +1 @@
Subproject commit f54c1d79540cd7789900b23459c6c14ed74127e2
Subproject commit 304d78d229d3bbca46d3e0752761c732e98ffe03