diff options
author | Bernhard Liebl <Bernhard.Liebl@gmx.org> | 2017-12-27 17:04:07 +0100 |
---|---|---|
committer | Bernhard Liebl <Bernhard.Liebl@gmx.org> | 2017-12-27 17:04:07 +0100 |
commit | 414c60aee7175596fa05916a74325e6496ff7280 (patch) | |
tree | 31caadef0f840ddbbc1776d6d4f678372aedbf78 | |
parent | 32d8b99bc31e3762ae0dc017a05567da2802a313 (diff) |
Support KEY_UP and KEY_DOWN in LineEdit
-rw-r--r-- | scene/gui/line_edit.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index cebbb2193d..f5b10aab21 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -368,6 +368,18 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) { shift_selection_check_post(k->get_shift()); } break; + case KEY_UP: { + + shift_selection_check_pre(k->get_shift()); + set_cursor_position(0); + shift_selection_check_post(k->get_shift()); + } break; + case KEY_DOWN: { + + shift_selection_check_pre(k->get_shift()); + set_cursor_position(text.length()); + shift_selection_check_post(k->get_shift()); + } break; case KEY_DELETE: { if (!editable) |