MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / End

Method End

TheForceEngine/TFE_Ui/imGUI/imgui.cpp:2953–2974  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2951}
2952
2953void ImGuiListClipper::End()
2954{
2955 if (ImGuiListClipperData* data = (ImGuiListClipperData*)TempData)
2956 {
2957 // In theory here we should assert that we are already at the right position, but it seems saner to just seek at the end and not assert/crash the user.
2958 ImGuiContext& g = *Ctx;
2959 IMGUI_DEBUG_LOG_CLIPPER("Clipper: End() in '%s'\n", g.CurrentWindow->Name);
2960 if (ItemsCount >= 0 && ItemsCount < INT_MAX && DisplayStart >= 0)
2961 SeekCursorForItem(ItemsCount);
2962
2963 // Restore temporary buffer and fix back pointers which may be invalidated when nesting
2964 IM_ASSERT(data->ListClipper == this);
2965 data->StepNo = data->Ranges.Size;
2966 if (--g.ClipperTempDataStacked > 0)
2967 {
2968 data = &g.ClipperTempData[g.ClipperTempDataStacked - 1];
2969 data->ListClipper->TempData = data;
2970 }
2971 TempData = NULL;
2972 }
2973 ItemsCount = -1;
2974}
2975
2976void ImGuiListClipper::IncludeItemsByIndex(int item_begin, int item_end)
2977{

Callers 1

DrawFunction · 0.45

Calls 2

SetCurrentWindowFunction · 0.85

Tested by

no test coverage detected