Update signal connections error dialog

This commit is contained in:
homer666 2019-04-17 09:37:07 +10:00
parent cea49f00c3
commit f33c554de1
2 changed files with 5 additions and 4 deletions

View File

@ -113,14 +113,14 @@ Signal automatically called by parent dialog.
void ConnectDialog::ok_pressed() { void ConnectDialog::ok_pressed() {
if (dst_method->get_text() == "") { if (dst_method->get_text() == "") {
error->set_text(TTR("Method in target Node must be specified!")); error->set_text(TTR("Method in target node must be specified."));
error->popup_centered_minsize(); error->popup_centered_minsize();
return; return;
} }
Node *target = tree->get_selected(); Node *target = tree->get_selected();
if (target->get_script().is_null()) { if (target->get_script().is_null()) {
if (!target->has_method(dst_method->get_text())) { if (!target->has_method(dst_method->get_text())) {
error->set_text(TTR("Target method not found! Specify a valid method or attach a script to target Node.")); error->set_text(TTR("Target method not found. Specify a valid method or attach a script to the target node."));
error->popup_centered_minsize(); error->popup_centered_minsize();
return; return;
} }
@ -440,8 +440,9 @@ ConnectDialog::ConnectDialog() {
cdbinds = memnew(ConnectDialogBinds); cdbinds = memnew(ConnectDialogBinds);
error = memnew(ConfirmationDialog); error = memnew(AcceptDialog);
add_child(error); add_child(error);
error->set_title(TTR("Cannot connect signal"));
error->get_ok()->set_text(TTR("Close")); error->get_ok()->set_text(TTR("Close"));
get_ok()->set_text(TTR("Connect")); get_ok()->set_text(TTR("Connect"));
} }

View File

@ -64,7 +64,7 @@ class ConnectDialog : public ConfirmationDialog {
VBoxContainer *vbc_right; VBoxContainer *vbc_right;
SceneTreeEditor *tree; SceneTreeEditor *tree;
ConfirmationDialog *error; AcceptDialog *error;
EditorInspector *bind_editor; EditorInspector *bind_editor;
OptionButton *type_list; OptionButton *type_list;
CheckButton *deferred; CheckButton *deferred;