summaryrefslogtreecommitdiff
path: root/scene/gui/line_edit.cpp
diff options
context:
space:
mode:
authorsanikoyes <sanikoyes@163.com>2014-03-13 16:58:03 +0800
committersanikoyes <sanikoyes@163.com>2014-03-13 16:58:03 +0800
commit51429bd8d6d2fed9636e1d252a5eb86567b846ec (patch)
treef602977014d4ab0ba13dd5cf523adaafe9912ede /scene/gui/line_edit.cpp
parent81757d2e977d959e6b0bc26f9fa990417ca91de9 (diff)
fix android can't input unicode characters
fix hide soft keyboard by press 'back' button, then click current focus text edit/line edit control, soft keyboard won't show again add features: press enter key with line edit control will hide soft keyboard
Diffstat (limited to 'scene/gui/line_edit.cpp')
-rw-r--r--scene/gui/line_edit.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 22316acaba..6c9db7484b 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -79,6 +79,9 @@ void LineEdit::_input_event(InputEvent p_event) {
}
selection.creating=false;
selection.doubleclick=false;
+
+ // notify to show soft keyboard
+ notification(NOTIFICATION_FOCUS_ENTER);
}
update();
@@ -208,6 +211,8 @@ void LineEdit::_input_event(InputEvent p_event) {
case KEY_RETURN: {
emit_signal( "text_entered",text );
+ // notify to hide soft keyboard
+ notification(NOTIFICATION_FOCUS_EXIT);
return;
} break;