diff options
| author | Max Hilbrunner | 2018-06-09 19:35:48 +0200 |
|---|---|---|
| committer | GitHub | 2018-06-09 19:35:48 +0200 |
| commit | e9492308379dfc26cd8223ceeaa4c41f98426b56 (patch) | |
| tree | 37c90c65ae9301574ef404e292119419243e102e | |
| parent | 0c2622a856ff7341628ef6415c08422c2193cf93 (diff) | |
| parent | b0069bb118820e5a62bb240be6bb75a5814b93c5 (diff) | |
| download | godot-e9492308379dfc26cd8223ceeaa4c41f98426b56.tar.gz godot-e9492308379dfc26cd8223ceeaa4c41f98426b56.tar.zst godot-e9492308379dfc26cd8223ceeaa4c41f98426b56.zip | |
| -rw-r--r-- | scene/gui/text_edit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 55a650ff1..1c6ac50b1 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -447,7 +447,7 @@ void TextEdit::_click_selection_held() { } void TextEdit::_update_selection_mode_pointer() { - Point2 mp = Input::get_singleton()->get_mouse_position() - get_global_position(); + Point2 mp = get_local_mouse_position(); int row, col; _get_mouse_pos(Point2i(mp.x, mp.y), row, col); @@ -462,7 +462,7 @@ void TextEdit::_update_selection_mode_pointer() { } void TextEdit::_update_selection_mode_word() { - Point2 mp = Input::get_singleton()->get_mouse_position() - get_global_position(); + Point2 mp = get_local_mouse_position(); int row, col; _get_mouse_pos(Point2i(mp.x, mp.y), row, col); @@ -515,7 +515,7 @@ void TextEdit::_update_selection_mode_word() { } void TextEdit::_update_selection_mode_line() { - Point2 mp = Input::get_singleton()->get_mouse_position() - get_global_position(); + Point2 mp = get_local_mouse_position(); int row, col; _get_mouse_pos(Point2i(mp.x, mp.y), row, col); |
