diff options
Diffstat (limited to 'scene/gui/dialogs.cpp')
-rw-r--r-- | scene/gui/dialogs.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp index 1cbe3adb3c..e3744eedca 100644 --- a/scene/gui/dialogs.cpp +++ b/scene/gui/dialogs.cpp @@ -33,12 +33,7 @@ #include "core/os/keyboard.h" #include "core/string/print_string.h" #include "core/string/translation.h" -#include "line_edit.h" - -#ifdef TOOLS_ENABLED -#include "editor/editor_node.h" -#include "scene/main/window.h" // Only used to check for more modals when dimming the editor. -#endif +#include "scene/gui/line_edit.h" // AcceptDialog @@ -72,21 +67,25 @@ void AcceptDialog::_notification(int p_what) { } } } break; + case NOTIFICATION_THEME_CHANGED: { bg->add_theme_style_override("panel", bg->get_theme_stylebox(SNAME("panel"), SNAME("AcceptDialog"))); } break; + case NOTIFICATION_EXIT_TREE: { if (parent_visible) { parent_visible->disconnect("focus_entered", callable_mp(this, &AcceptDialog::_parent_focused)); parent_visible = nullptr; } } break; + case NOTIFICATION_READY: case NOTIFICATION_WM_SIZE_CHANGED: { if (is_visible()) { _update_child_rects(); } } break; + case NOTIFICATION_WM_CLOSE_REQUEST: { _cancel_pressed(); } break; |