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

Function ClampWindowPos

KBotExt/imgui/imgui.cpp:5936–5943  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5934}
5935
5936static inline void ClampWindowPos(ImGuiWindow* window, const ImRect& visibility_rect)
5937{
5938 ImGuiContext& g = *GImGui;
5939 ImVec2 size_for_clamping = window->Size;
5940 if (g.IO.ConfigWindowsMoveFromTitleBarOnly && !(window->Flags & ImGuiWindowFlags_NoTitleBar))
5941 size_for_clamping.y = window->TitleBarHeight();
5942 window->Pos = ImClamp(window->Pos, visibility_rect.Min - size_for_clamping, visibility_rect.Max);
5943}
5944
5945static void ImGui::RenderWindowOuterBorders(ImGuiWindow* window)
5946{

Callers 1

BeginMethod · 0.85

Calls 1

ImClampFunction · 0.85

Tested by

no test coverage detected