소스 검색

InputText(): fixed mouse-dragging not scroll tracking the cursor when text doesn't fit (fix #339)

ocornut 10 년 전
부모
커밋
0e86ed9361
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      imgui.cpp

+ 1 - 0
imgui.cpp

@@ -7177,6 +7177,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
         {
             stb_textedit_drag(&edit_state, &edit_state.StbState, mouse_x, mouse_y);
             edit_state.CursorAnimReset();
+            edit_state.CursorFollow = true;
         }
         if (edit_state.SelectedAllMouseLock && !io.MouseDown[0])
             edit_state.SelectedAllMouseLock = false;