Skip to content

Commit

Permalink
Added Index, Priority, Before, After
Browse files Browse the repository at this point in the history
  • Loading branch information
Aragas committed Mar 8, 2021
1 parent 719b73b commit fa04a8e
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions src/Bannerlord.Harmony/DebugUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private void DisplayPatches()

if (!allPatches.Any() || !Imgui.TreeNode(originalMethod.FullDescription())) continue;

Imgui.Columns(3);
Imgui.Columns(6);
Imgui.Text("Type");
foreach (var _ in patches.Prefixes) Imgui.Text("Prefix");
foreach (var _ in patches.Postfixes) Imgui.Text("Postfix");
Expand All @@ -81,11 +81,32 @@ private void DisplayPatches()
}

Imgui.NextColumn();
Imgui.Text("Method");
Imgui.Text("Index");
foreach (var patch in allPatches)
{
Imgui.Text($"{patch.index}");
}

Imgui.NextColumn();
Imgui.Text("Priority");
foreach (var patch in allPatches)
{
Imgui.Text($"{patch.priority}");
}

Imgui.NextColumn();
Imgui.Text("Before");
foreach (var patch in allPatches)
{
Imgui.Text($"{string.Join(",", patch.before)}");
}

Imgui.NextColumn();
Imgui.Text("After");
Imgui.Separator();
foreach (var patch in allPatches)
{
Imgui.Text($"{patch.PatchMethod.DeclaringType!.FullName}.{patch.PatchMethod.Name}");
Imgui.Text($"{string.Join(",", patch.after)}");
}

Imgui.Columns();
Expand Down

0 comments on commit fa04a8e

Please sign in to comment.