Explorar o código

SetCursorScreenPos() fixed not adjusting CursorMaxPos as well

ocornut %!s(int64=9) %!d(string=hai) anos
pai
achega
fe7274b6c7
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      imgui.cpp

+ 1 - 0
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()