mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-19 14:27:50 +01:00
Properly debug in IPCTester, as much as the current implementation allows.
This commit is contained in:
parent
2b60f204e8
commit
45deebc3c4
1 changed files with 36 additions and 3 deletions
|
|
@ -71,9 +71,7 @@ public class CollectionsIpcTester : IUiService, IDisposable
|
||||||
IpcTester.DrawIntro("Last Return Code", _returnCode.ToString());
|
IpcTester.DrawIntro("Last Return Code", _returnCode.ToString());
|
||||||
|
|
||||||
IpcTester.DrawIntro(ResolvedFileChanged.Label, "Last Resolved File Change");
|
IpcTester.DrawIntro(ResolvedFileChanged.Label, "Last Resolved File Change");
|
||||||
ImGui.TextUnformatted(_lastResolvedFileChangeMod.Length > 0
|
DrawLastResolvedFileChange();
|
||||||
? $"{_lastResolvedFileChangeType} of {_lastResolvedFileChangeMod} in {_lastResolvedFileChangeCollection} for game path {_lastResolvedFileChangeGamePath} from {_lastResolvedFileChangeOldFilePath} to {_lastResolvedFileChangeNewFilePath}"
|
|
||||||
: "None");
|
|
||||||
|
|
||||||
if (_oldCollection != null)
|
if (_oldCollection != null)
|
||||||
ImGui.TextUnformatted(!_oldCollection.HasValue ? "Created" : _oldCollection.ToString());
|
ImGui.TextUnformatted(!_oldCollection.HasValue ? "Created" : _oldCollection.ToString());
|
||||||
|
|
@ -250,6 +248,41 @@ public class CollectionsIpcTester : IUiService, IDisposable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DrawLastResolvedFileChange()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(_lastResolvedFileChangeMod))
|
||||||
|
{
|
||||||
|
ImGui.TextUnformatted("<No Change>");
|
||||||
|
ImGui.TableNextColumn();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui.TextUnformatted(_lastResolvedFileChangeType.ToString());
|
||||||
|
ImGui.TableNextColumn();
|
||||||
|
using var font = ImRaii.PushFont(UiBuilder.MonoFont);
|
||||||
|
ImGui.Selectable("View Details");
|
||||||
|
if (ImGui.IsItemHovered())
|
||||||
|
{
|
||||||
|
using var tt = ImRaii.Tooltip();
|
||||||
|
using (var t = ImRaii.Table("resolveddetails", 2, ImGuiTableFlags.SizingFixedFit))
|
||||||
|
{
|
||||||
|
if (t)
|
||||||
|
{
|
||||||
|
ImGuiUtil.DrawTableColumn("Collection");
|
||||||
|
ImGuiUtil.DrawTableColumn(_lastResolvedFileChangeCollection.ToString());
|
||||||
|
ImGuiUtil.DrawTableColumn("Mod");
|
||||||
|
ImGuiUtil.DrawTableColumn(_lastResolvedFileChangeMod);
|
||||||
|
ImGuiUtil.DrawTableColumn("Game Path");
|
||||||
|
ImGuiUtil.DrawTableColumn(_lastResolvedFileChangeGamePath);
|
||||||
|
ImGuiUtil.DrawTableColumn("Old Path");
|
||||||
|
ImGuiUtil.DrawTableColumn(_lastResolvedFileChangeOldFilePath);
|
||||||
|
ImGuiUtil.DrawTableColumn("New Path");
|
||||||
|
ImGuiUtil.DrawTableColumn(_lastResolvedFileChangeNewFilePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void UpdateLastResolvedChange(ResolvedFileChange type, Guid collection, string mod, string gamePath, string oldFilePath, string newFilePath)
|
private void UpdateLastResolvedChange(ResolvedFileChange type, Guid collection, string mod, string gamePath, string oldFilePath, string newFilePath)
|
||||||
{
|
{
|
||||||
_lastResolvedFileChangeType = type;
|
_lastResolvedFileChangeType = type;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue