Clipper: added SeekCursorForItem() function, for use when using ImGuiListClipper::Begin(INT_MAX). (#1311)

Tagging #3609 just in case we made a mistake introducing a regression (but tests are passing and have been extended).
This commit is contained in:
ocornut
2024-07-17 18:14:01 +02:00
parent 74a1854db9
commit 8bab3eab6a
3 changed files with 30 additions and 14 deletions

View File

@@ -77,6 +77,10 @@ Other changes:
Disabling this was previously possible for Selectable() via a direct flag but not for MenuItem().
(#1379, #1468, #2200, #4936, #5216, #7302, #7573)
- This was mostly all previously in imgui_internal.h.
- Clipper: added SeekCursorForItem() function. When using ImGuiListClipper::Begin(INT_MAX) you can
can use the clipper without knowing the amount of items beforehand. (#1311)
In this situation, call ImGuiListClipper::SeekCursorForItem(items_count) as the end of your iteration
loop to position the layout cursor correctly. This is done automatically if provided a count to Begin().
- Style: close button and collapse/window-menu button hover highlight made rectangular instead of round.
- Debug Tools: Added IMGUI_DEBUG_LOG(), ImGui::DebugLog() in public API. (#5855)
Debug log entries add a imgui frame counter prefix + are redirected to ShowDebugLogWindow() and