MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / ImGuiListClipper_SeekCursorForItem

Function ImGuiListClipper_SeekCursorForItem

KBotExt/imgui/imgui.cpp:2785–2792  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2783}
2784
2785static void ImGuiListClipper_SeekCursorForItem(ImGuiListClipper* clipper, int item_n)
2786{
2787 // StartPosY starts from ItemsFrozen hence the subtraction
2788 // Perform the add and multiply with double to allow seeking through larger ranges
2789 ImGuiListClipperData* data = (ImGuiListClipperData*)clipper->TempData;
2790 float pos_y = (float)((double)clipper->StartPosY + data->LossynessOffset + (double)(item_n - data->ItemsFrozen) * clipper->ItemsHeight);
2791 ImGuiListClipper_SeekCursorAndSetupPrevLine(pos_y, clipper->ItemsHeight);
2792}
2793
2794ImGuiListClipper::ImGuiListClipper()
2795{

Callers 2

EndMethod · 0.85

Tested by

no test coverage detected