mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-13 00:24:20 +00:00
Merge branch 'master' into docking
# Conflicts: # imgui.cpp # imgui_demo.cpp
This commit is contained in:
commit
139e99ca37
9 changed files with 139 additions and 116 deletions
14
imgui.cpp
14
imgui.cpp
|
|
@ -1,4 +1,4 @@
|
|||
// dear imgui, v1.91.0 WIP
|
||||
// dear imgui, v1.91.0
|
||||
// (main code and documentation)
|
||||
|
||||
// Help:
|
||||
|
|
@ -438,7 +438,7 @@ CODE
|
|||
- likewise io.MousePos and GetMousePos() will use OS coordinates.
|
||||
If you query mouse positions to interact with non-imgui coordinates you will need to offset them, e.g. subtract GetWindowViewport()->Pos.
|
||||
|
||||
- 2024/07/25 (1.91.0) - obsoleted GetContentRegionMax(), GetWindowContentRegionMin() and GetWindowContentRegionMax().
|
||||
- 2024/07/25 (1.91.0) - obsoleted GetContentRegionMax(), GetWindowContentRegionMin() and GetWindowContentRegionMax(). (see #7838 on GitHub for more info)
|
||||
you should never need those functions. you can do everything with GetCursorScreenPos() and GetContentRegionAvail() in a more simple way.
|
||||
- instead of: GetWindowContentRegionMax().x - GetCursorPos().x
|
||||
- you can use: GetContentRegionAvail().x
|
||||
|
|
@ -3123,7 +3123,8 @@ static bool ImGuiListClipper_StepInternal(ImGuiListClipper* clipper)
|
|||
bool affected_by_floating_point_precision = ImIsFloatAboveGuaranteedIntegerPrecision(clipper->StartPosY) || ImIsFloatAboveGuaranteedIntegerPrecision(window->DC.CursorPos.y);
|
||||
if (affected_by_floating_point_precision)
|
||||
clipper->ItemsHeight = window->DC.PrevLineSize.y + g.Style.ItemSpacing.y; // FIXME: Technically wouldn't allow multi-line entries.
|
||||
|
||||
if (clipper->ItemsHeight == 0.0f && clipper->ItemsCount == INT_MAX) // Accept that no item have been submitted if in indeterminate mode.
|
||||
return false;
|
||||
IM_ASSERT(clipper->ItemsHeight > 0.0f && "Unable to calculate item height! First item hasn't moved the cursor vertically!");
|
||||
calc_clipping = true; // If item height had to be calculated, calculate clipping afterwards.
|
||||
}
|
||||
|
|
@ -20795,7 +20796,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