Listbox: commented out obsolete/redirecting functions that were marked obsolete more than two years ago: ListBoxHeader(), ListBoxFooter().

+ Added default parameter to SeparatorEx() amend 2c558d5
This commit is contained in:
ocornut
2023-05-22 10:09:20 +02:00
parent df8667b18b
commit 45c8c3b611
5 changed files with 13 additions and 20 deletions

View File

@ -6619,20 +6619,6 @@ bool ImGui::BeginListBox(const char* label, const ImVec2& size_arg)
return true;
}
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
// OBSOLETED in 1.81 (from February 2021)
bool ImGui::ListBoxHeader(const char* label, int items_count, int height_in_items)
{
// If height_in_items == -1, default height is maximum 7.
ImGuiContext& g = *GImGui;
float height_in_items_f = (height_in_items < 0 ? ImMin(items_count, 7) : height_in_items) + 0.25f;
ImVec2 size;
size.x = 0.0f;
size.y = GetTextLineHeightWithSpacing() * height_in_items_f + g.Style.FramePadding.y * 2.0f;
return BeginListBox(label, size);
}
#endif
void ImGui::EndListBox()
{
ImGuiContext& g = *GImGui;