This is already called while stepping. The ONLY reason you may want to call this is if you passed INT_MAX to ImGuiListClipper::Begin() because you couldn't step item count beforehand.
| 2985 | // This is already called while stepping. |
| 2986 | // The ONLY reason you may want to call this is if you passed INT_MAX to ImGuiListClipper::Begin() because you couldn't step item count beforehand. |
| 2987 | void ImGuiListClipper::SeekCursorForItem(int item_n) |
| 2988 | { |
| 2989 | // - Perform the add and multiply with double to allow seeking through larger ranges. |
| 2990 | // - StartPosY starts from ItemsFrozen, by adding SeekOffsetY we generally cancel that out (SeekOffsetY == LossynessOffset - ItemsFrozen * ItemsHeight). |
| 2991 | // - The reason we store SeekOffsetY instead of inferring it, is because we want to allow user to perform Seek after the last step, where ImGuiListClipperData is already done. |
| 2992 | float pos_y = (float)((double)StartPosY + StartSeekOffsetY + (double)item_n * ItemsHeight); |
| 2993 | ImGuiListClipper_SeekCursorAndSetupPrevLine(pos_y, ItemsHeight); |
| 2994 | } |
| 2995 | |
| 2996 | static bool ImGuiListClipper_StepInternal(ImGuiListClipper* clipper) |
| 2997 | { |
no test coverage detected