aboutsummaryrefslogtreecommitdiff
path: root/scene/gui/control.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2016-01-23 11:45:36 -0300
committerJuan Linietsky2016-01-23 11:45:36 -0300
commit5a1593951bc331583e5867eea0449958509e20b9 (patch)
treed64b9f71c30d695d59633abd6f4a3a885161d6f5 /scene/gui/control.cpp
parent9743bc32beb922bdae5c4a1081ce9a6874e59325 (diff)
downloadgodot-5a1593951bc331583e5867eea0449958509e20b9.tar.gz
godot-5a1593951bc331583e5867eea0449958509e20b9.tar.zst
godot-5a1593951bc331583e5867eea0449958509e20b9.zip
-Added a "modal_close" signal for controls
-Used it to keep changes on lineedit when focused out
Diffstat (limited to 'scene/gui/control.cpp')
-rw-r--r--scene/gui/control.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 8f6a0b4d5..dce0a4ac0 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -509,6 +509,10 @@ void Control::_notification(int p_notification) {
update();
} break;
+ case NOTIFICATION_MODAL_CLOSE: {
+
+ emit_signal("modal_close");
+ } break;
case NOTIFICATION_VISIBILITY_CHANGED: {
if (!is_visible()) {
@@ -2246,6 +2250,7 @@ void Control::_bind_methods() {
ADD_SIGNAL( MethodInfo("focus_exit") );
ADD_SIGNAL( MethodInfo("size_flags_changed") );
ADD_SIGNAL( MethodInfo("minimum_size_changed") );
+ ADD_SIGNAL( MethodInfo("modal_close") );
}