diff options
author | Gabriel Gavilan <me@gabrii.com> | 2018-04-19 20:05:18 +0200 |
---|---|---|
committer | Gabriel Gavilan <me@gabrii.com> | 2018-05-09 20:37:50 +0200 |
commit | b0069bb118820e5a62bb240be6bb75a5814b93c5 (patch) | |
tree | 8edd283fea5d4616640487269087976548de8b65 /scene | |
parent | 394e6d5ee1479d402892d6df75dddceeb967efcc (diff) |
Apply viewport scale to selection update methods. Changed to propper fix sugested by reduz
Diffstat (limited to 'scene')
-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 ff3cbbd591..cf987d3d61 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -415,7 +415,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); @@ -430,7 +430,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); @@ -483,7 +483,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); |