From fe7274b6c7ab0039f5ec588d76a4e237dab1be87 Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 29 Jun 2016 10:25:47 +0200 Subject: [PATCH] SetCursorScreenPos() fixed not adjusting CursorMaxPos as well --- imgui.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/imgui.cpp b/imgui.cpp index 3486458b2..083dfd626 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -5129,6 +5129,7 @@ void ImGui::SetCursorScreenPos(const ImVec2& screen_pos) { ImGuiWindow* window = GetCurrentWindow(); window->DC.CursorPos = screen_pos; + window->DC.CursorMaxPos = ImMax(window->DC.CursorMaxPos, window->DC.CursorPos); } float ImGui::GetScrollX()