mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-26 02:34:23 +00:00
Demo: re-use tree data. Fix property editor vertical alignment. Tweak recent memory allocation monitor.
This commit is contained in:
parent
1f634f1d94
commit
1b44e40444
2 changed files with 57 additions and 43 deletions
|
|
@ -15070,7 +15070,12 @@ void ImGui::ShowMetricsWindow(bool* p_open)
|
|||
for (int n = buf_size - 1; n >= 0; n--)
|
||||
{
|
||||
ImGuiDebugAllocEntry* entry = &info->LastEntriesBuf[(info->LastEntriesIdx - n + buf_size) % buf_size];
|
||||
BulletText("Frame %06d: %+3d ( %2d malloc, %2d free )%s", entry->FrameCount, entry->AllocCount - entry->FreeCount, entry->AllocCount, entry->FreeCount, (n == 0) ? " (most recent)" : "");
|
||||
BulletText("Frame %06d: %+3d ( %2d alloc, %2d free )", entry->FrameCount, entry->AllocCount - entry->FreeCount, entry->AllocCount, entry->FreeCount);
|
||||
if (n == 0)
|
||||
{
|
||||
SameLine();
|
||||
Text("<- %d frames ago", g.FrameCount - entry->FrameCount);
|
||||
}
|
||||
}
|
||||
TreePop();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue