From b1ab7e1cd013587756cec20a03b942c27306c801 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Sat, 29 Apr 2023 18:34:39 +0200 Subject: [PATCH] Add mod state debugging. --- Penumbra/UI/Tabs/DebugTab.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Penumbra/UI/Tabs/DebugTab.cs b/Penumbra/UI/Tabs/DebugTab.cs index 267937b9..20cb1a19 100644 --- a/Penumbra/UI/Tabs/DebugTab.cs +++ b/Penumbra/UI/Tabs/DebugTab.cs @@ -160,6 +160,27 @@ public class DebugTab : ITab foreach (var collection in _collectionManager.Storage) PrintValue(collection.Name, collection.HasCache.ToString()); } + + using (var tree = TreeNode("Mods")) + { + if (!tree) + return; + + using var table = Table("##DebugModsTable", 3, ImGuiTableFlags.SizingFixedFit); + if (!table) + return; + + var lastIndex = -1; + foreach (var mod in _modManager) + { + PrintValue(mod.Name, mod.Index.ToString("D5")); + ImGui.TableNextColumn(); + var index = mod.Index; + if (index != lastIndex + 1) + ImGui.TextUnformatted("!!!"); + lastIndex = index; + } + } } private void DrawPerformanceTab()