mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 05:04:15 +01:00
Update showObject, use in gauge pane
This commit is contained in:
parent
735292e86c
commit
287c7c8a78
2 changed files with 6 additions and 10 deletions
|
|
@ -799,15 +799,7 @@ namespace Dalamud.Interface.Internal.Windows
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var props = gauge.GetType().GetProperties().OrderBy(prop => prop.Name);
|
Util.ShowObject(gauge);
|
||||||
foreach (var prop in props)
|
|
||||||
{
|
|
||||||
var result = prop.GetValue(gauge);
|
|
||||||
if (result.GetType() == typeof(IntPtr))
|
|
||||||
ImGui.Text($"{prop.Name}: {result:X}");
|
|
||||||
else
|
|
||||||
ImGui.Text($"{prop.Name}: {result}");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawCommand()
|
private void DrawCommand()
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,11 @@ namespace Dalamud.Utility
|
||||||
|
|
||||||
foreach (var propertyInfo in type.GetProperties())
|
foreach (var propertyInfo in type.GetProperties())
|
||||||
{
|
{
|
||||||
ImGui.TextColored(ImGuiColors.DalamudOrange, $" {propertyInfo.Name}: {propertyInfo.GetValue(obj)}");
|
var value = propertyInfo.GetValue(obj);
|
||||||
|
if (value.GetType() == typeof(IntPtr))
|
||||||
|
ImGui.TextColored(ImGuiColors.DalamudOrange, $" {propertyInfo.Name}: 0x{value:X}");
|
||||||
|
else
|
||||||
|
ImGui.TextColored(ImGuiColors.DalamudOrange, $" {propertyInfo.Name}: {value}");
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.Unindent();
|
ImGui.Unindent();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue