summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-01-03 11:32:31 +0100
committerGitHub <noreply@github.com>2018-01-03 11:32:31 +0100
commitfd5f193da5dd9e2647c3b63e1daf1c0ad0ba7af9 (patch)
tree58edd22b8f6a7c3002e9fee81d17656ef822d185 /scene/gui
parent48962db5b4832f1643817f1e7eeee98d1bfd9af1 (diff)
parent414c60aee7175596fa05916a74325e6496ff7280 (diff)
Merge pull request #15103 from poke1024/lineedit-key-up-down
Support KEY_UP and KEY_DOWN in LineEdit
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/line_edit.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 34abb1fbcc..dff7722a9e 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)