mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-24 05:19:02 +08:00
Clipper: Renamed ForceDisplayRangeByIndices() to IncludeRangeByIndices(). (#6424, #3841) + commented out obsolete ImGuiListClipper() constructor.
This commit is contained in:
parent
a550263d6c
commit
ecb0aaa7c2
@ -37,6 +37,10 @@ HOW TO UPDATE?
|
||||
|
||||
Breaking changes:
|
||||
|
||||
- Clipper: Commented out obsolete redirection constructor which was marked obsolete in 1.79:
|
||||
'ImGuiListClipper(int items_count, float items_height)' --> Use 'ImGuiListClipper() + clipper.Begin().clipper.Begin()'.
|
||||
- Clipper: Renamed ForceDisplayRangeByIndices() to IncludeRangeByIndices(), kept
|
||||
inline redirection function (introduced in 1.86 andrarely used). (#6424, #3841)
|
||||
- Backends: GLUT: Removed call to ImGui::NewFrame() from ImGui_ImplGLUT_NewFrame().
|
||||
It needs to be called from the main app loop, like with every other backends. (#6337) [@GereonV]
|
||||
|
||||
@ -928,7 +932,7 @@ Other Changes:
|
||||
Fixes issue where e.g. drag and dropping an item and scrolling ensure the item source location is
|
||||
still submitted. (#3841, #1725) [@GamingMinds-DanielC, @ocornut]
|
||||
- Clipper: added ForceDisplayRangeByIndices() to force a given item (or several) to be stepped out
|
||||
during a clipping operation. (#3841) [@@GamingMinds-DanielC]
|
||||
during a clipping operation. (#3841) [@GamingMinds-DanielC]
|
||||
- Clipper: rework so gamepad/keyboard navigation doesn't create spikes in number of items requested
|
||||
by the clipper to display. (#3841)
|
||||
- Clipper: fixed content height declaration slightly mismatching the value of when not using a clipper.
|
||||
|
@ -397,7 +397,10 @@ CODE
|
||||
When you are not sure about an old symbol or function name, try using the Search/Find function of your IDE to look for comments or references in all imgui files.
|
||||
You can read releases logs https://github.com/ocornut/imgui/releases for more details.
|
||||
|
||||
- 2023/03/14 (1.89.4) - commented out redirecting enums/functions names that were marked obsolete two years ago:
|
||||
|
||||
- 2023/05/15 (1.86.6) - clipper: commented out obsolete redirection constructor 'ImGuiListClipper(int items_count, float items_height = -1.0f)' that was marked obsolete in 1.79. Use default constructor + clipper.Begin().
|
||||
- 2023/05/15 (1.89.6) - clipper: renamed ImGuiListClipper::ForceDisplayRangeByIndices() to ImGuiListClipper::IncludeRangeByIndices().
|
||||
- 2023/03/14 (1.89.4) - commented out redirecting enums/functions names that were marked obsolete two years ago:
|
||||
- ImGuiSliderFlags_ClampOnInput -> use ImGuiSliderFlags_AlwaysClamp
|
||||
- ImGuiInputTextFlags_AlwaysInsertMode -> use ImGuiInputTextFlags_AlwaysOverwrite
|
||||
- ImDrawList::AddBezierCurve() -> use ImDrawList::AddBezierCubic()
|
||||
@ -2803,7 +2806,7 @@ void ImGuiListClipper::End()
|
||||
ItemsCount = -1;
|
||||
}
|
||||
|
||||
void ImGuiListClipper::ForceDisplayRangeByIndices(int item_min, int item_max)
|
||||
void ImGuiListClipper::IncludeRangeByIndices(int item_min, int item_max)
|
||||
{
|
||||
ImGuiListClipperData* data = (ImGuiListClipperData*)TempData;
|
||||
IM_ASSERT(DisplayStart < 0); // Only allowed after Begin() and if there has not been a specified range yet.
|
||||
|
7
imgui.h
7
imgui.h
@ -2344,11 +2344,12 @@ struct ImGuiListClipper
|
||||
IMGUI_API void End(); // Automatically called on the last call of Step() that returns false.
|
||||
IMGUI_API bool Step(); // Call until it returns false. The DisplayStart/DisplayEnd fields will be set and you can process/draw those items.
|
||||
|
||||
// Call ForceDisplayRangeByIndices() before first call to Step() if you need a range of items to be displayed regardless of visibility.
|
||||
IMGUI_API void ForceDisplayRangeByIndices(int item_min, int item_max); // item_max is exclusive e.g. use (42, 42+1) to make item 42 always visible BUT due to alignment/padding of certain items it is likely that an extra item may be included on either end of the display range.
|
||||
// Call IncludeRangeByIndices() before first call to Step() if you need a range of items to be displayed regardless of visibility.
|
||||
IMGUI_API void IncludeRangeByIndices(int item_begin, int item_end); // item_end is exclusive e.g. use (42, 42+1) to make item 42 always visible BUT due to alignment/padding of certain items it is possible/likely that an extra item may be included on either end of the display range.
|
||||
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
inline ImGuiListClipper(int items_count, float items_height = -1.0f) { memset(this, 0, sizeof(*this)); ItemsCount = -1; Begin(items_count, items_height); } // [removed in 1.79]
|
||||
inline void ForceDisplayRangeByIndices(int item_begin, int item_end) { IncludeRangeByIndices(item_begin, item_end); } // [renamed in 1.89.6]
|
||||
//inline ImGuiListClipper(int items_count, float items_height = -1.0f) { memset(this, 0, sizeof(*this)); ItemsCount = -1; Begin(items_count, items_height); } // [removed in 1.79]
|
||||
#endif
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user