1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-24 15:26:15 +00:00

Reworked signal connection system, added support for Callable and Signal objects and made them default.

This commit is contained in:
Juan Linietsky
2020-02-19 16:27:19 -03:00
committed by Juan Linietsky
parent 1a4be2cd8f
commit 69c95f4b4c
275 changed files with 3831 additions and 2948 deletions

View File

@@ -835,8 +835,8 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
autoload_add_path = memnew(EditorLineEditFileChooser);
autoload_add_path->set_h_size_flags(SIZE_EXPAND_FILL);
autoload_add_path->get_file_dialog()->set_mode(EditorFileDialog::MODE_OPEN_FILE);
autoload_add_path->get_file_dialog()->connect("file_selected", this, "_autoload_file_callback");
autoload_add_path->get_line_edit()->connect("text_changed", this, "_autoload_path_text_changed");
autoload_add_path->get_file_dialog()->connect_compat("file_selected", this, "_autoload_file_callback");
autoload_add_path->get_line_edit()->connect_compat("text_changed", this, "_autoload_path_text_changed");
hbc->add_child(autoload_add_path);
@@ -846,13 +846,13 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
autoload_add_name = memnew(LineEdit);
autoload_add_name->set_h_size_flags(SIZE_EXPAND_FILL);
autoload_add_name->connect("text_entered", this, "_autoload_text_entered");
autoload_add_name->connect("text_changed", this, "_autoload_text_changed");
autoload_add_name->connect_compat("text_entered", this, "_autoload_text_entered");
autoload_add_name->connect_compat("text_changed", this, "_autoload_text_changed");
hbc->add_child(autoload_add_name);
add_autoload = memnew(Button);
add_autoload->set_text(TTR("Add"));
add_autoload->connect("pressed", this, "_autoload_add");
add_autoload->connect_compat("pressed", this, "_autoload_add");
// The button will be enabled once a valid name is entered (either automatically or manually).
add_autoload->set_disabled(true);
hbc->add_child(add_autoload);
@@ -882,10 +882,10 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
tree->set_column_expand(3, false);
tree->set_column_min_width(3, 120 * EDSCALE);
tree->connect("cell_selected", this, "_autoload_selected");
tree->connect("item_edited", this, "_autoload_edited");
tree->connect("button_pressed", this, "_autoload_button_pressed");
tree->connect("item_activated", this, "_autoload_activated");
tree->connect_compat("cell_selected", this, "_autoload_selected");
tree->connect_compat("item_edited", this, "_autoload_edited");
tree->connect_compat("button_pressed", this, "_autoload_button_pressed");
tree->connect_compat("item_activated", this, "_autoload_activated");
tree->set_v_size_flags(SIZE_EXPAND_FILL);
add_child(tree, true);