MCPcopy Create free account
hub / github.com/Wemino/MarkerPatch / ExtendHitBoxWhenNearViewportEdge

Method ExtendHitBoxWhenNearViewportEdge

include/imgui/imgui_widgets.cpp:988–996  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

986}
987
988void ImGui::ExtendHitBoxWhenNearViewportEdge(ImGuiWindow* window, ImRect* bb, float threshold, ImGuiAxis axis)
989{
990 ImRect window_rect = window->RootWindow->Rect();
991 ImRect viewport_rect = window->Viewport->GetMainRect();
992 if (window_rect.Min[axis] == viewport_rect.Min[axis] && bb->Min[axis] > window_rect.Min[axis] && bb->Min[axis] - threshold <= window_rect.Min[axis])
993 bb->Min[axis] = window_rect.Min[axis];
994 if (window_rect.Max[axis] == viewport_rect.Max[axis] && bb->Max[axis] < window_rect.Max[axis] && bb->Max[axis] + threshold >= window_rect.Max[axis])
995 bb->Max[axis] = window_rect.Max[axis];
996}
997
998void ImGui::Scrollbar(ImGuiAxis axis)
999{

Callers

nothing calls this directly

Calls 1

GetMainRectMethod · 0.80

Tested by

no test coverage detected