summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorBojidar Marinov <bojidar.marinov.bg@gmail.com>2017-08-06 16:26:07 +0300
committerBojidar Marinov <bojidar.marinov.bg@gmail.com>2017-08-06 16:26:07 +0300
commit7b7c7c8dc0e3572a7d66d274b3e4db43695ce814 (patch)
tree25d57da6ca8f480f0012b10935b96caba6eda32d /scene/gui
parent97e942dd42ea5df241e1e81704eaa6c383f3c9b4 (diff)
Rename KEY_RETURN to KEY_ENTER and KEY_ENTER to KEY_KP_ENTER
Closes #7695
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/line_edit.cpp4
-rw-r--r--scene/gui/popup_menu.cpp4
-rw-r--r--scene/gui/text_edit.cpp6
-rw-r--r--scene/gui/tree.cpp8
4 files changed, 11 insertions, 11 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index f4dd3e92cd..8556ce5db1 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -229,8 +229,8 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
bool handled = true;
switch (code) {
- case KEY_ENTER:
- case KEY_RETURN: {
+ case KEY_KP_ENTER:
+ case KEY_ENTER: {
emit_signal("text_entered", text);
if (OS::get_singleton()->has_virtual_keyboard())
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index f59a2e06eb..b673f9d68a 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -249,8 +249,8 @@ void PopupMenu::_gui_input(const Ref<InputEvent> &p_event) {
}
}
} break;
- case KEY_RETURN:
- case KEY_ENTER: {
+ case KEY_ENTER:
+ case KEY_KP_ENTER: {
if (mouse_over >= 0 && mouse_over < items.size() && !items[mouse_over].separator) {
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 2fc3204f3a..a7c31361e8 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -1805,7 +1805,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
return;
}
- if (k->get_scancode() == KEY_ENTER || k->get_scancode() == KEY_RETURN || k->get_scancode() == KEY_TAB) {
+ if (k->get_scancode() == KEY_KP_ENTER || k->get_scancode() == KEY_ENTER || k->get_scancode() == KEY_TAB) {
_confirm_completion();
accept_event();
@@ -1974,8 +1974,8 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
switch (k->get_scancode()) {
- case KEY_ENTER:
- case KEY_RETURN: {
+ case KEY_KP_ENTER:
+ case KEY_ENTER: {
if (readonly)
break;
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 0b57841be7..9499ba9dcd 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -1917,8 +1917,8 @@ int Tree::propagate_mouse_event(const Point2i &p_pos, int x_ofs, int y_ofs, bool
void Tree::_text_editor_modal_close() {
if (Input::get_singleton()->is_key_pressed(KEY_ESCAPE) ||
- Input::get_singleton()->is_key_pressed(KEY_ENTER) ||
- Input::get_singleton()->is_key_pressed(KEY_RETURN)) {
+ Input::get_singleton()->is_key_pressed(KEY_KP_ENTER) ||
+ Input::get_singleton()->is_key_pressed(KEY_ENTER)) {
return;
}
@@ -2237,8 +2237,8 @@ void Tree::_gui_input(Ref<InputEvent> p_event) {
} break;
case KEY_F2:
- case KEY_RETURN:
- case KEY_ENTER: {
+ case KEY_ENTER:
+ case KEY_KP_ENTER: {
if (selected_item) {
//bring up editor if possible