diff options
Diffstat (limited to 'scene/gui/dialogs.cpp')
-rw-r--r-- | scene/gui/dialogs.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp index 9f08b6f845..d00dacd256 100644 --- a/scene/gui/dialogs.cpp +++ b/scene/gui/dialogs.cpp @@ -188,7 +188,7 @@ void AcceptDialog::_post_popup() { } void AcceptDialog::_notification(int p_what) { - + if (p_what==NOTIFICATION_MODAL_CLOSE) { cancel_pressed(); @@ -197,7 +197,7 @@ void AcceptDialog::_notification(int p_what) { - } + } } void AcceptDialog::_builtin_text_entered(const String& p_text) { @@ -206,7 +206,7 @@ void AcceptDialog::_builtin_text_entered(const String& p_text) { } void AcceptDialog::_ok_pressed() { - + if (hide_on_ok) hide(); ok_pressed(); @@ -214,7 +214,7 @@ void AcceptDialog::_ok_pressed() { } void AcceptDialog::_close_pressed() { - + cancel_pressed(); } @@ -223,7 +223,7 @@ String AcceptDialog::get_text() const { return label->get_text(); } void AcceptDialog::set_text(String p_text) { - + label->set_text(p_text); } @@ -291,7 +291,7 @@ Button* AcceptDialog::add_cancel(const String &p_cancel) { } void AcceptDialog::_bind_methods() { - + ObjectTypeDB::bind_method(_MD("_ok"),&AcceptDialog::_ok_pressed); ObjectTypeDB::bind_method(_MD("get_ok"),&AcceptDialog::get_ok); ObjectTypeDB::bind_method(_MD("get_label"),&AcceptDialog::get_label); @@ -321,11 +321,11 @@ void AcceptDialog::set_swap_ok_cancel(bool p_swap) { } AcceptDialog::AcceptDialog() { - + int margin = get_constant("margin","Dialogs"); int button_margin = get_constant("button_margin","Dialogs"); - - + + label = memnew( Label ); label->set_anchor(MARGIN_RIGHT,ANCHOR_END); label->set_anchor(MARGIN_BOTTOM,ANCHOR_END); @@ -345,8 +345,8 @@ AcceptDialog::AcceptDialog() { hbc->add_child(ok); hbc->add_spacer(); //add_child(ok); - - + + ok->connect("pressed", this,"_ok"); set_as_toplevel(true); |