summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorJuan Linietsky <juan@godotengine.org>2020-02-19 16:27:19 -0300
committerJuan Linietsky <reduzio@gmail.com>2020-02-20 08:24:50 +0100
commit69c95f4b4c128a22777af1e155bc24c7033decca (patch)
tree0add52fc270f808b4b2ad0bf7c970d72338c667e /editor/plugins
parent1a4be2cd8fdd9ba26f016f3e2d83febfe8ae141c (diff)
Reworked signal connection system, added support for Callable and Signal objects and made them default.
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp10
-rw-r--r--editor/plugins/animation_blend_space_1d_editor.cpp32
-rw-r--r--editor/plugins/animation_blend_space_2d_editor.cpp52
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp42
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp54
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp32
-rw-r--r--editor/plugins/animation_tree_editor_plugin.cpp4
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp64
-rw-r--r--editor/plugins/audio_stream_editor_plugin.cpp14
-rw-r--r--editor/plugins/camera_editor_plugin.cpp2
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp106
-rw-r--r--editor/plugins/collision_polygon_editor_plugin.cpp6
-rw-r--r--editor/plugins/cpu_particles_2d_editor_plugin.cpp6
-rw-r--r--editor/plugins/cpu_particles_editor_plugin.cpp2
-rw-r--r--editor/plugins/curve_editor_plugin.cpp12
-rw-r--r--editor/plugins/gi_probe_editor_plugin.cpp4
-rw-r--r--editor/plugins/gradient_editor_plugin.cpp4
-rw-r--r--editor/plugins/item_list_editor_plugin.cpp8
-rw-r--r--editor/plugins/material_editor_plugin.cpp8
-rw-r--r--editor/plugins/mesh_editor_plugin.cpp4
-rw-r--r--editor/plugins/mesh_instance_editor_plugin.cpp6
-rw-r--r--editor/plugins/mesh_library_editor_plugin.cpp6
-rw-r--r--editor/plugins/multimesh_editor_plugin.cpp10
-rw-r--r--editor/plugins/particles_2d_editor_plugin.cpp8
-rw-r--r--editor/plugins/particles_editor_plugin.cpp12
-rw-r--r--editor/plugins/path_2d_editor_plugin.cpp20
-rw-r--r--editor/plugins/path_editor_plugin.cpp10
-rw-r--r--editor/plugins/physical_bone_plugin.cpp2
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp42
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.cpp10
-rw-r--r--editor/plugins/root_motion_editor_plugin.cpp8
-rw-r--r--editor/plugins/script_editor_plugin.cpp130
-rw-r--r--editor/plugins/script_text_editor.cpp74
-rw-r--r--editor/plugins/shader_editor_plugin.cpp24
-rw-r--r--editor/plugins/skeleton_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/skeleton_editor_plugin.cpp4
-rw-r--r--editor/plugins/skeleton_ik_editor_plugin.cpp2
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp94
-rw-r--r--editor/plugins/sprite_editor_plugin.cpp8
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp48
-rw-r--r--editor/plugins/style_box_editor_plugin.cpp6
-rw-r--r--editor/plugins/text_editor.cpp22
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp30
-rw-r--r--editor/plugins/theme_editor_plugin.cpp12
-rw-r--r--editor/plugins/tile_map_editor_plugin.cpp56
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp54
-rw-r--r--editor/plugins/version_control_editor_plugin.cpp22
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp106
48 files changed, 647 insertions, 647 deletions
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index 2d038d11ad..6f29b6c76a 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -209,8 +209,8 @@ void AbstractPolygon2DEditor::_notification(int p_what) {
button_delete->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("CurveDelete", "EditorIcons"));
button_edit->set_pressed(true);
- get_tree()->connect("node_removed", this, "_node_removed");
- create_resource->connect("confirmed", this, "_create_resource");
+ get_tree()->connect_compat("node_removed", this, "_node_removed");
+ create_resource->connect_compat("confirmed", this, "_create_resource");
} break;
}
}
@@ -820,17 +820,17 @@ AbstractPolygon2DEditor::AbstractPolygon2DEditor(EditorNode *p_editor, bool p_wi
add_child(memnew(VSeparator));
button_create = memnew(ToolButton);
add_child(button_create);
- button_create->connect("pressed", this, "_menu_option", varray(MODE_CREATE));
+ button_create->connect_compat("pressed", this, "_menu_option", varray(MODE_CREATE));
button_create->set_toggle_mode(true);
button_edit = memnew(ToolButton);
add_child(button_edit);
- button_edit->connect("pressed", this, "_menu_option", varray(MODE_EDIT));
+ button_edit->connect_compat("pressed", this, "_menu_option", varray(MODE_EDIT));
button_edit->set_toggle_mode(true);
button_delete = memnew(ToolButton);
add_child(button_delete);
- button_delete->connect("pressed", this, "_menu_option", varray(MODE_DELETE));
+ button_delete->connect_compat("pressed", this, "_menu_option", varray(MODE_DELETE));
button_delete->set_toggle_mode(true);
create_resource = memnew(ConfirmationDialog);
diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp
index 9261613ddd..c955f2b806 100644
--- a/editor/plugins/animation_blend_space_1d_editor.cpp
+++ b/editor/plugins/animation_blend_space_1d_editor.cpp
@@ -622,28 +622,28 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
top_hb->add_child(tool_blend);
tool_blend->set_pressed(true);
tool_blend->set_tooltip(TTR("Set the blending position within the space"));
- tool_blend->connect("pressed", this, "_tool_switch", varray(3));
+ tool_blend->connect_compat("pressed", this, "_tool_switch", varray(3));
tool_select = memnew(ToolButton);
tool_select->set_toggle_mode(true);
tool_select->set_button_group(bg);
top_hb->add_child(tool_select);
tool_select->set_tooltip(TTR("Select and move points, create points with RMB."));
- tool_select->connect("pressed", this, "_tool_switch", varray(0));
+ tool_select->connect_compat("pressed", this, "_tool_switch", varray(0));
tool_create = memnew(ToolButton);
tool_create->set_toggle_mode(true);
tool_create->set_button_group(bg);
top_hb->add_child(tool_create);
tool_create->set_tooltip(TTR("Create points."));
- tool_create->connect("pressed", this, "_tool_switch", varray(1));
+ tool_create->connect_compat("pressed", this, "_tool_switch", varray(1));
tool_erase_sep = memnew(VSeparator);
top_hb->add_child(tool_erase_sep);
tool_erase = memnew(ToolButton);
top_hb->add_child(tool_erase);
tool_erase->set_tooltip(TTR("Erase points."));
- tool_erase->connect("pressed", this, "_erase_selected");
+ tool_erase->connect_compat("pressed", this, "_erase_selected");
top_hb->add_child(memnew(VSeparator));
@@ -652,7 +652,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
top_hb->add_child(snap);
snap->set_pressed(true);
snap->set_tooltip(TTR("Enable snap and show grid."));
- snap->connect("pressed", this, "_snap_toggled");
+ snap->connect_compat("pressed", this, "_snap_toggled");
snap_value = memnew(SpinBox);
top_hb->add_child(snap_value);
@@ -670,12 +670,12 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
edit_value->set_min(-1000);
edit_value->set_max(1000);
edit_value->set_step(0.01);
- edit_value->connect("value_changed", this, "_edit_point_pos");
+ edit_value->connect_compat("value_changed", this, "_edit_point_pos");
open_editor = memnew(Button);
edit_hb->add_child(open_editor);
open_editor->set_text(TTR("Open Editor"));
- open_editor->connect("pressed", this, "_open_editor", varray(), CONNECT_DEFERRED);
+ open_editor->connect_compat("pressed", this, "_open_editor", varray(), CONNECT_DEFERRED);
edit_hb->hide();
open_editor->hide();
@@ -691,8 +691,8 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
panel->set_v_size_flags(SIZE_EXPAND_FILL);
blend_space_draw = memnew(Control);
- blend_space_draw->connect("gui_input", this, "_blend_space_gui_input");
- blend_space_draw->connect("draw", this, "_blend_space_draw");
+ blend_space_draw->connect_compat("gui_input", this, "_blend_space_gui_input");
+ blend_space_draw->connect_compat("draw", this, "_blend_space_draw");
blend_space_draw->set_focus_mode(FOCUS_ALL);
panel->add_child(blend_space_draw);
@@ -724,10 +724,10 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
bottom_hb->add_child(max_value);
}
- snap_value->connect("value_changed", this, "_config_changed");
- min_value->connect("value_changed", this, "_config_changed");
- max_value->connect("value_changed", this, "_config_changed");
- label_value->connect("text_changed", this, "_labels_changed");
+ snap_value->connect_compat("value_changed", this, "_config_changed");
+ min_value->connect_compat("value_changed", this, "_config_changed");
+ max_value->connect_compat("value_changed", this, "_config_changed");
+ label_value->connect_compat("text_changed", this, "_labels_changed");
error_panel = memnew(PanelContainer);
add_child(error_panel);
@@ -740,18 +740,18 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", this, "_add_menu_type");
+ menu->connect_compat("id_pressed", this, "_add_menu_type");
animations_menu = memnew(PopupMenu);
menu->add_child(animations_menu);
animations_menu->set_name("animations");
- animations_menu->connect("index_pressed", this, "_add_animation_type");
+ animations_menu->connect_compat("index_pressed", this, "_add_animation_type");
open_file = memnew(EditorFileDialog);
add_child(open_file);
open_file->set_title(TTR("Open Animation Node"));
open_file->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- open_file->connect("file_selected", this, "_file_opened");
+ open_file->connect_compat("file_selected", this, "_file_opened");
undo_redo = EditorNode::get_undo_redo();
selected_point = -1;
diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp
index fdd8ffd58f..d2306a5d6b 100644
--- a/editor/plugins/animation_blend_space_2d_editor.cpp
+++ b/editor/plugins/animation_blend_space_2d_editor.cpp
@@ -55,12 +55,12 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_changed() {
void AnimationNodeBlendSpace2DEditor::edit(const Ref<AnimationNode> &p_node) {
if (blend_space.is_valid()) {
- blend_space->disconnect("triangles_updated", this, "_blend_space_changed");
+ blend_space->disconnect_compat("triangles_updated", this, "_blend_space_changed");
}
blend_space = p_node;
if (!blend_space.is_null()) {
- blend_space->connect("triangles_updated", this, "_blend_space_changed");
+ blend_space->connect_compat("triangles_updated", this, "_blend_space_changed");
_update_space();
}
}
@@ -870,42 +870,42 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
top_hb->add_child(tool_blend);
tool_blend->set_pressed(true);
tool_blend->set_tooltip(TTR("Set the blending position within the space"));
- tool_blend->connect("pressed", this, "_tool_switch", varray(3));
+ tool_blend->connect_compat("pressed", this, "_tool_switch", varray(3));
tool_select = memnew(ToolButton);
tool_select->set_toggle_mode(true);
tool_select->set_button_group(bg);
top_hb->add_child(tool_select);
tool_select->set_tooltip(TTR("Select and move points, create points with RMB."));
- tool_select->connect("pressed", this, "_tool_switch", varray(0));
+ tool_select->connect_compat("pressed", this, "_tool_switch", varray(0));
tool_create = memnew(ToolButton);
tool_create->set_toggle_mode(true);
tool_create->set_button_group(bg);
top_hb->add_child(tool_create);
tool_create->set_tooltip(TTR("Create points."));
- tool_create->connect("pressed", this, "_tool_switch", varray(1));
+ tool_create->connect_compat("pressed", this, "_tool_switch", varray(1));
tool_triangle = memnew(ToolButton);
tool_triangle->set_toggle_mode(true);
tool_triangle->set_button_group(bg);
top_hb->add_child(tool_triangle);
tool_triangle->set_tooltip(TTR("Create triangles by connecting points."));
- tool_triangle->connect("pressed", this, "_tool_switch", varray(2));
+ tool_triangle->connect_compat("pressed", this, "_tool_switch", varray(2));
tool_erase_sep = memnew(VSeparator);
top_hb->add_child(tool_erase_sep);
tool_erase = memnew(ToolButton);
top_hb->add_child(tool_erase);
tool_erase->set_tooltip(TTR("Erase points and triangles."));
- tool_erase->connect("pressed", this, "_erase_selected");
+ tool_erase->connect_compat("pressed", this, "_erase_selected");
tool_erase->set_disabled(true);
top_hb->add_child(memnew(VSeparator));
auto_triangles = memnew(ToolButton);
top_hb->add_child(auto_triangles);
- auto_triangles->connect("pressed", this, "_auto_triangles_toggled");
+ auto_triangles->connect_compat("pressed", this, "_auto_triangles_toggled");
auto_triangles->set_toggle_mode(true);
auto_triangles->set_tooltip(TTR("Generate blend triangles automatically (instead of manually)"));
@@ -916,7 +916,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
top_hb->add_child(snap);
snap->set_pressed(true);
snap->set_tooltip(TTR("Enable snap and show grid."));
- snap->connect("pressed", this, "_snap_toggled");
+ snap->connect_compat("pressed", this, "_snap_toggled");
snap_x = memnew(SpinBox);
top_hb->add_child(snap_x);
@@ -937,7 +937,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
top_hb->add_child(memnew(Label(TTR("Blend:"))));
interpolation = memnew(OptionButton);
top_hb->add_child(interpolation);
- interpolation->connect("item_selected", this, "_config_changed");
+ interpolation->connect_compat("item_selected", this, "_config_changed");
edit_hb = memnew(HBoxContainer);
top_hb->add_child(edit_hb);
@@ -948,17 +948,17 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
edit_x->set_min(-1000);
edit_x->set_step(0.01);
edit_x->set_max(1000);
- edit_x->connect("value_changed", this, "_edit_point_pos");
+ edit_x->connect_compat("value_changed", this, "_edit_point_pos");
edit_y = memnew(SpinBox);
edit_hb->add_child(edit_y);
edit_y->set_min(-1000);
edit_y->set_step(0.01);
edit_y->set_max(1000);
- edit_y->connect("value_changed", this, "_edit_point_pos");
+ edit_y->connect_compat("value_changed", this, "_edit_point_pos");
open_editor = memnew(Button);
edit_hb->add_child(open_editor);
open_editor->set_text(TTR("Open Editor"));
- open_editor->connect("pressed", this, "_open_editor", varray(), CONNECT_DEFERRED);
+ open_editor->connect_compat("pressed", this, "_open_editor", varray(), CONNECT_DEFERRED);
edit_hb->hide();
open_editor->hide();
@@ -999,8 +999,8 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
panel->set_h_size_flags(SIZE_EXPAND_FILL);
blend_space_draw = memnew(Control);
- blend_space_draw->connect("gui_input", this, "_blend_space_gui_input");
- blend_space_draw->connect("draw", this, "_blend_space_draw");
+ blend_space_draw->connect_compat("gui_input", this, "_blend_space_gui_input");
+ blend_space_draw->connect_compat("draw", this, "_blend_space_draw");
blend_space_draw->set_focus_mode(FOCUS_ALL);
panel->add_child(blend_space_draw);
@@ -1029,14 +1029,14 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
min_x_value->set_step(0.01);
}
- snap_x->connect("value_changed", this, "_config_changed");
- snap_y->connect("value_changed", this, "_config_changed");
- max_x_value->connect("value_changed", this, "_config_changed");
- min_x_value->connect("value_changed", this, "_config_changed");
- max_y_value->connect("value_changed", this, "_config_changed");
- min_y_value->connect("value_changed", this, "_config_changed");
- label_x->connect("text_changed", this, "_labels_changed");
- label_y->connect("text_changed", this, "_labels_changed");
+ snap_x->connect_compat("value_changed", this, "_config_changed");
+ snap_y->connect_compat("value_changed", this, "_config_changed");
+ max_x_value->connect_compat("value_changed", this, "_config_changed");
+ min_x_value->connect_compat("value_changed", this, "_config_changed");
+ max_y_value->connect_compat("value_changed", this, "_config_changed");
+ min_y_value->connect_compat("value_changed", this, "_config_changed");
+ label_x->connect_compat("text_changed", this, "_labels_changed");
+ label_y->connect_compat("text_changed", this, "_labels_changed");
error_panel = memnew(PanelContainer);
add_child(error_panel);
@@ -1050,18 +1050,18 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", this, "_add_menu_type");
+ menu->connect_compat("id_pressed", this, "_add_menu_type");
animations_menu = memnew(PopupMenu);
menu->add_child(animations_menu);
animations_menu->set_name("animations");
- animations_menu->connect("index_pressed", this, "_add_animation_type");
+ animations_menu->connect_compat("index_pressed", this, "_add_animation_type");
open_file = memnew(EditorFileDialog);
add_child(open_file);
open_file->set_title(TTR("Open Animation Node"));
open_file->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- open_file->connect("file_selected", this, "_file_opened");
+ open_file->connect_compat("file_selected", this, "_file_opened");
undo_redo = EditorNode::get_undo_redo();
selected_point = -1;
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index a100525d10..f2daa809b4 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -146,11 +146,11 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
name->set_expand_to_text_length(true);
node->add_child(name);
node->set_slot(0, false, 0, Color(), true, 0, get_color("font_color", "Label"));
- name->connect("text_entered", this, "_node_renamed", varray(agnode));
- name->connect("focus_exited", this, "_node_renamed_focus_out", varray(name, agnode), CONNECT_DEFERRED);
+ name->connect_compat("text_entered", this, "_node_renamed", varray(agnode));
+ name->connect_compat("focus_exited", this, "_node_renamed_focus_out", varray(name, agnode), CONNECT_DEFERRED);
base = 1;
node->set_show_close_button(true);
- node->connect("close_request", this, "_delete_request", varray(E->get()), CONNECT_DEFERRED);
+ node->connect_compat("close_request", this, "_delete_request", varray(E->get()), CONNECT_DEFERRED);
}
for (int i = 0; i < agnode->get_input_count(); i++) {
@@ -173,13 +173,13 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
prop->set_object_and_property(AnimationTreeEditor::get_singleton()->get_tree(), base_path);
prop->update_property();
prop->set_name_split_ratio(0);
- prop->connect("property_changed", this, "_property_changed");
+ prop->connect_compat("property_changed", this, "_property_changed");
node->add_child(prop);
visible_properties.push_back(prop);
}
}
- node->connect("dragged", this, "_node_dragged", varray(E->get()));
+ node->connect_compat("dragged", this, "_node_dragged", varray(E->get()));
if (AnimationTreeEditor::get_singleton()->can_edit(agnode)) {
node->add_child(memnew(HSeparator));
@@ -187,7 +187,7 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
open_in_editor->set_text(TTR("Open Editor"));
open_in_editor->set_icon(get_icon("Edit", "EditorIcons"));
node->add_child(open_in_editor);
- open_in_editor->connect("pressed", this, "_open_in_editor", varray(E->get()), CONNECT_DEFERRED);
+ open_in_editor->connect_compat("pressed", this, "_open_in_editor", varray(E->get()), CONNECT_DEFERRED);
open_in_editor->set_h_size_flags(SIZE_SHRINK_CENTER);
}
@@ -198,7 +198,7 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
edit_filters->set_text(TTR("Edit Filters"));
edit_filters->set_icon(get_icon("AnimationFilter", "EditorIcons"));
node->add_child(edit_filters);
- edit_filters->connect("pressed", this, "_edit_filters", varray(E->get()), CONNECT_DEFERRED);
+ edit_filters->connect_compat("pressed", this, "_edit_filters", varray(E->get()), CONNECT_DEFERRED);
edit_filters->set_h_size_flags(SIZE_SHRINK_CENTER);
}
@@ -238,7 +238,7 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
animations[E->get()] = pb;
node->add_child(pb);
- mb->get_popup()->connect("index_pressed", this, "_anim_selected", varray(options, E->get()), CONNECT_DEFERRED);
+ mb->get_popup()->connect_compat("index_pressed", this, "_anim_selected", varray(options, E->get()), CONNECT_DEFERRED);
}
if (EditorSettings::get_singleton()->get("interface/theme/use_graph_node_headers")) {
@@ -911,7 +911,7 @@ bool AnimationNodeBlendTreeEditor::can_edit(const Ref<AnimationNode> &p_node) {
void AnimationNodeBlendTreeEditor::edit(const Ref<AnimationNode> &p_node) {
if (blend_tree.is_valid()) {
- blend_tree->disconnect("removed_from_graph", this, "_removed_from_graph");
+ blend_tree->disconnect_compat("removed_from_graph", this, "_removed_from_graph");
}
blend_tree = p_node;
@@ -919,7 +919,7 @@ void AnimationNodeBlendTreeEditor::edit(const Ref<AnimationNode> &p_node) {
if (blend_tree.is_null()) {
hide();
} else {
- blend_tree->connect("removed_from_graph", this, "_removed_from_graph");
+ blend_tree->connect_compat("removed_from_graph", this, "_removed_from_graph");
_update_graph();
}
@@ -936,12 +936,12 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
graph->add_valid_right_disconnect_type(0);
graph->add_valid_left_disconnect_type(0);
graph->set_v_size_flags(SIZE_EXPAND_FILL);
- graph->connect("connection_request", this, "_connection_request", varray(), CONNECT_DEFERRED);
- graph->connect("disconnection_request", this, "_disconnection_request", varray(), CONNECT_DEFERRED);
- graph->connect("node_selected", this, "_node_selected");
- graph->connect("scroll_offset_changed", this, "_scroll_changed");
- graph->connect("delete_nodes_request", this, "_delete_nodes_request");
- graph->connect("popup_request", this, "_popup_request");
+ graph->connect_compat("connection_request", this, "_connection_request", varray(), CONNECT_DEFERRED);
+ graph->connect_compat("disconnection_request", this, "_disconnection_request", varray(), CONNECT_DEFERRED);
+ graph->connect_compat("node_selected", this, "_node_selected");
+ graph->connect_compat("scroll_offset_changed", this, "_scroll_changed");
+ graph->connect_compat("delete_nodes_request", this, "_delete_nodes_request");
+ graph->connect_compat("popup_request", this, "_popup_request");
VSeparator *vs = memnew(VSeparator);
graph->get_zoom_hbox()->add_child(vs);
@@ -951,8 +951,8 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
graph->get_zoom_hbox()->add_child(add_node);
add_node->set_text(TTR("Add Node..."));
graph->get_zoom_hbox()->move_child(add_node, 0);
- add_node->get_popup()->connect("id_pressed", this, "_add_node");
- add_node->connect("about_to_show", this, "_update_options_menu");
+ add_node->get_popup()->connect_compat("id_pressed", this, "_add_node");
+ add_node->connect_compat("about_to_show", this, "_update_options_menu");
add_options.push_back(AddOption("Animation", "AnimationNodeAnimation"));
add_options.push_back(AddOption("OneShot", "AnimationNodeOneShot"));
@@ -984,19 +984,19 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
filter_enabled = memnew(CheckBox);
filter_enabled->set_text(TTR("Enable Filtering"));
- filter_enabled->connect("pressed", this, "_filter_toggled");
+ filter_enabled->connect_compat("pressed", this, "_filter_toggled");
filter_vbox->add_child(filter_enabled);
filters = memnew(Tree);
filter_vbox->add_child(filters);
filters->set_v_size_flags(SIZE_EXPAND_FILL);
filters->set_hide_root(true);
- filters->connect("item_edited", this, "_filter_edited");
+ filters->connect_compat("item_edited", this, "_filter_edited");
open_file = memnew(EditorFileDialog);
add_child(open_file);
open_file->set_title(TTR("Open Animation Node"));
open_file->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- open_file->connect("file_selected", this, "_file_opened");
+ open_file->connect_compat("file_selected", this, "_file_opened");
undo_redo = EditorNode::get_undo_redo();
}
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index d8bbac9c49..26c3c21d61 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -99,13 +99,13 @@ void AnimationPlayerEditor::_notification(int p_what) {
} break;
case NOTIFICATION_ENTER_TREE: {
- tool_anim->get_popup()->connect("id_pressed", this, "_animation_tool_menu");
+ tool_anim->get_popup()->connect_compat("id_pressed", this, "_animation_tool_menu");
- onion_skinning->get_popup()->connect("id_pressed", this, "_onion_skinning_menu");
+ onion_skinning->get_popup()->connect_compat("id_pressed", this, "_onion_skinning_menu");
- blend_editor.next->connect("item_selected", this, "_blend_editor_next_changed");
+ blend_editor.next->connect_compat("item_selected", this, "_blend_editor_next_changed");
- get_tree()->connect("node_removed", this, "_node_removed");
+ get_tree()->connect_compat("node_removed", this, "_node_removed");
add_style_override("panel", editor->get_gui_base()->get_stylebox("panel", "Panel"));
} break;
@@ -1504,16 +1504,16 @@ void AnimationPlayerEditor::_prepare_onion_layers_2() {
void AnimationPlayerEditor::_start_onion_skinning() {
// FIXME: Using "idle_frame" makes onion layers update one frame behind the current.
- if (!get_tree()->is_connected("idle_frame", this, "call_deferred")) {
- get_tree()->connect("idle_frame", this, "call_deferred", varray("_prepare_onion_layers_1"));
+ if (!get_tree()->is_connected_compat("idle_frame", this, "call_deferred")) {
+ get_tree()->connect_compat("idle_frame", this, "call_deferred", varray("_prepare_onion_layers_1"));
}
}
void AnimationPlayerEditor::_stop_onion_skinning() {
- if (get_tree()->is_connected("idle_frame", this, "call_deferred")) {
+ if (get_tree()->is_connected_compat("idle_frame", this, "call_deferred")) {
- get_tree()->disconnect("idle_frame", this, "call_deferred");
+ get_tree()->disconnect_compat("idle_frame", this, "call_deferred");
_free_onion_layers();
@@ -1630,11 +1630,11 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
accept = memnew(AcceptDialog);
add_child(accept);
- accept->connect("confirmed", this, "_menu_confirm_current");
+ accept->connect_compat("confirmed", this, "_menu_confirm_current");
delete_dialog = memnew(ConfirmationDialog);
add_child(delete_dialog);
- delete_dialog->connect("confirmed", this, "_animation_remove_confirmed");
+ delete_dialog->connect_compat("confirmed", this, "_animation_remove_confirmed");
tool_anim = memnew(MenuButton);
tool_anim->set_flat(false);
@@ -1679,7 +1679,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
onion_toggle = memnew(ToolButton);
onion_toggle->set_toggle_mode(true);
onion_toggle->set_tooltip(TTR("Enable Onion Skinning"));
- onion_toggle->connect("pressed", this, "_onion_skinning_menu", varray(ONION_SKINNING_ENABLE));
+ onion_toggle->connect_compat("pressed", this, "_onion_skinning_menu", varray(ONION_SKINNING_ENABLE));
hb->add_child(onion_toggle);
onion_skinning = memnew(MenuButton);
@@ -1705,7 +1705,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
pin->set_toggle_mode(true);
pin->set_tooltip(TTR("Pin AnimationPlayer"));
hb->add_child(pin);
- pin->connect("pressed", this, "_pin_pressed");
+ pin->connect_compat("pressed", this, "_pin_pressed");
file = memnew(EditorFileDialog);
add_child(file);
@@ -1729,7 +1729,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
error_dialog->set_title(TTR("Error!"));
add_child(error_dialog);
- name_dialog->connect("confirmed", this, "_animation_name_edited");
+ name_dialog->connect_compat("confirmed", this, "_animation_name_edited");
blend_editor.dialog = memnew(AcceptDialog);
add_child(blend_editor.dialog);
@@ -1745,21 +1745,21 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
blend_editor.dialog->set_title(TTR("Cross-Animation Blend Times"));
updating_blends = false;
- blend_editor.tree->connect("item_edited", this, "_blend_edited");
+ blend_editor.tree->connect_compat("item_edited", this, "_blend_edited");
- autoplay->connect("pressed", this, "_autoplay_pressed");
+ autoplay->connect_compat("pressed", this, "_autoplay_pressed");
autoplay->set_toggle_mode(true);
- play->connect("pressed", this, "_play_pressed");
- play_from->connect("pressed", this, "_play_from_pressed");
- play_bw->connect("pressed", this, "_play_bw_pressed");
- play_bw_from->connect("pressed", this, "_play_bw_from_pressed");
- stop->connect("pressed", this, "_stop_pressed");
+ play->connect_compat("pressed", this, "_play_pressed");
+ play_from->connect_compat("pressed", this, "_play_from_pressed");
+ play_bw->connect_compat("pressed", this, "_play_bw_pressed");
+ play_bw_from->connect_compat("pressed", this, "_play_bw_from_pressed");
+ stop->connect_compat("pressed", this, "_stop_pressed");
- animation->connect("item_selected", this, "_animation_selected", Vector<Variant>(), true);
+ animation->connect_compat("item_selected", this, "_animation_selected", Vector<Variant>(), true);
- file->connect("file_selected", this, "_dialog_action");
- frame->connect("value_changed", this, "_seek_value_changed", Vector<Variant>(), true);
- scale->connect("text_entered", this, "_scale_changed", Vector<Variant>(), true);
+ file->connect_compat("file_selected", this, "_dialog_action");
+ frame->connect_compat("value_changed", this, "_seek_value_changed", Vector<Variant>(), true);
+ scale->connect_compat("text_entered", this, "_scale_changed", Vector<Variant>(), true);
renaming = false;
last_active = false;
@@ -1769,14 +1769,14 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
add_child(track_editor);
track_editor->set_v_size_flags(SIZE_EXPAND_FILL);
- track_editor->connect("timeline_changed", this, "_animation_key_editor_seek");
- track_editor->connect("animation_len_changed", this, "_animation_key_editor_anim_len_changed");
+ track_editor->connect_compat("timeline_changed", this, "_animation_key_editor_seek");
+ track_editor->connect_compat("animation_len_changed", this, "_animation_key_editor_anim_len_changed");
_update_player();
// Onion skinning.
- track_editor->connect("visibility_changed", this, "_editor_visibility_changed");
+ track_editor->connect_compat("visibility_changed", this, "_editor_visibility_changed");
onion.enabled = false;
onion.past = true;
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index 035a67b821..6f29aba356 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -1276,21 +1276,21 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
tool_select->set_button_group(bg);
tool_select->set_pressed(true);
tool_select->set_tooltip(TTR("Select and move nodes.\nRMB to add new nodes.\nShift+LMB to create connections."));
- tool_select->connect("pressed", this, "_update_mode", varray(), CONNECT_DEFERRED);
+ tool_select->connect_compat("pressed", this, "_update_mode", varray(), CONNECT_DEFERRED);
tool_create = memnew(ToolButton);
top_hb->add_child(tool_create);
tool_create->set_toggle_mode(true);
tool_create->set_button_group(bg);
tool_create->set_tooltip(TTR("Create new nodes."));
- tool_create->connect("pressed", this, "_update_mode", varray(), CONNECT_DEFERRED);
+ tool_create->connect_compat("pressed", this, "_update_mode", varray(), CONNECT_DEFERRED);
tool_connect = memnew(ToolButton);
top_hb->add_child(tool_connect);
tool_connect->set_toggle_mode(true);
tool_connect->set_button_group(bg);
tool_connect->set_tooltip(TTR("Connect nodes."));
- tool_connect->connect("pressed", this, "_update_mode", varray(), CONNECT_DEFERRED);
+ tool_connect->connect_compat("pressed", this, "_update_mode", varray(), CONNECT_DEFERRED);
tool_erase_hb = memnew(HBoxContainer);
top_hb->add_child(tool_erase_hb);
@@ -1298,7 +1298,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
tool_erase = memnew(ToolButton);
tool_erase->set_tooltip(TTR("Remove selected node or transition."));
tool_erase_hb->add_child(tool_erase);
- tool_erase->connect("pressed", this, "_erase_selected");
+ tool_erase->connect_compat("pressed", this, "_erase_selected");
tool_erase->set_disabled(true);
tool_erase_hb->add_child(memnew(VSeparator));
@@ -1306,13 +1306,13 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
tool_autoplay = memnew(ToolButton);
tool_autoplay->set_tooltip(TTR("Toggle autoplay this animation on start, restart or seek to zero."));
tool_erase_hb->add_child(tool_autoplay);
- tool_autoplay->connect("pressed", this, "_autoplay_selected");
+ tool_autoplay->connect_compat("pressed", this, "_autoplay_selected");
tool_autoplay->set_disabled(true);
tool_end = memnew(ToolButton);
tool_end->set_tooltip(TTR("Set the end animation. This is useful for sub-transitions."));
tool_erase_hb->add_child(tool_end);
- tool_end->connect("pressed", this, "_end_selected");
+ tool_end->connect_compat("pressed", this, "_end_selected");
tool_end->set_disabled(true);
top_hb->add_child(memnew(VSeparator));
@@ -1333,26 +1333,26 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
state_machine_draw = memnew(Control);
panel->add_child(state_machine_draw);
- state_machine_draw->connect("gui_input", this, "_state_machine_gui_input");
- state_machine_draw->connect("draw", this, "_state_machine_draw");
+ state_machine_draw->connect_compat("gui_input", this, "_state_machine_gui_input");
+ state_machine_draw->connect_compat("draw", this, "_state_machine_draw");
state_machine_draw->set_focus_mode(FOCUS_ALL);
state_machine_play_pos = memnew(Control);
state_machine_draw->add_child(state_machine_play_pos);
state_machine_play_pos->set_mouse_filter(MOUSE_FILTER_PASS); //pass all to parent
state_machine_play_pos->set_anchors_and_margins_preset(PRESET_WIDE);
- state_machine_play_pos->connect("draw", this, "_state_machine_pos_draw");
+ state_machine_play_pos->connect_compat("draw", this, "_state_machine_pos_draw");
v_scroll = memnew(VScrollBar);
state_machine_draw->add_child(v_scroll);
v_scroll->set_anchors_and_margins_preset(PRESET_RIGHT_WIDE);
- v_scroll->connect("value_changed", this, "_scroll_changed");
+ v_scroll->connect_compat("value_changed", this, "_scroll_changed");
h_scroll = memnew(HScrollBar);
state_machine_draw->add_child(h_scroll);
h_scroll->set_anchors_and_margins_preset(PRESET_BOTTOM_WIDE);
h_scroll->set_margin(MARGIN_RIGHT, -v_scroll->get_size().x * EDSCALE);
- h_scroll->connect("value_changed", this, "_scroll_changed");
+ h_scroll->connect_compat("value_changed", this, "_scroll_changed");
error_panel = memnew(PanelContainer);
add_child(error_panel);
@@ -1366,25 +1366,25 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", this, "_add_menu_type");
+ menu->connect_compat("id_pressed", this, "_add_menu_type");
animations_menu = memnew(PopupMenu);
menu->add_child(animations_menu);
animations_menu->set_name("animations");
- animations_menu->connect("index_pressed", this, "_add_animation_type");
+ animations_menu->connect_compat("index_pressed", this, "_add_animation_type");
name_edit = memnew(LineEdit);
state_machine_draw->add_child(name_edit);
name_edit->hide();
- name_edit->connect("text_entered", this, "_name_edited");
- name_edit->connect("focus_exited", this, "_name_edited_focus_out");
+ name_edit->connect_compat("text_entered", this, "_name_edited");
+ name_edit->connect_compat("focus_exited", this, "_name_edited_focus_out");
name_edit->set_as_toplevel(true);
open_file = memnew(EditorFileDialog);
add_child(open_file);
open_file->set_title(TTR("Open Animation Node"));
open_file->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- open_file->connect("file_selected", this, "_file_opened");
+ open_file->connect_compat("file_selected", this, "_file_opened");
undo_redo = EditorNode::get_undo_redo();
over_text = false;
diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp
index a729c90160..8900882725 100644
--- a/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_editor_plugin.cpp
@@ -85,7 +85,7 @@ void AnimationTreeEditor::_update_path() {
b->set_button_group(group);
b->set_pressed(true);
b->set_focus_mode(FOCUS_NONE);
- b->connect("pressed", this, "_path_button_pressed", varray(-1));
+ b->connect_compat("pressed", this, "_path_button_pressed", varray(-1));
path_hb->add_child(b);
for (int i = 0; i < button_path.size(); i++) {
b = memnew(Button);
@@ -95,7 +95,7 @@ void AnimationTreeEditor::_update_path() {
path_hb->add_child(b);
b->set_pressed(true);
b->set_focus_mode(FOCUS_NONE);
- b->connect("pressed", this, "_path_button_pressed", varray(i));
+ b->connect_compat("pressed", this, "_path_button_pressed", varray(i));
}
}
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index 3d47dd46db..01c3c33995 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -112,7 +112,7 @@ EditorAssetLibraryItem::EditorAssetLibraryItem() {
icon = memnew(TextureButton);
icon->set_custom_minimum_size(Size2(64, 64) * EDSCALE);
icon->set_default_cursor_shape(CURSOR_POINTING_HAND);
- icon->connect("pressed", this, "_asset_clicked");
+ icon->connect_compat("pressed", this, "_asset_clicked");
hb->add_child(icon);
@@ -123,17 +123,17 @@ EditorAssetLibraryItem::EditorAssetLibraryItem() {
title = memnew(LinkButton);
title->set_underline_mode(LinkButton::UNDERLINE_MODE_ON_HOVER);
- title->connect("pressed", this, "_asset_clicked");
+ title->connect_compat("pressed", this, "_asset_clicked");
vb->add_child(title);
category = memnew(LinkButton);
category->set_underline_mode(LinkButton::UNDERLINE_MODE_ON_HOVER);
- category->connect("pressed", this, "_category_clicked");
+ category->connect_compat("pressed", this, "_category_clicked");
vb->add_child(category);
author = memnew(LinkButton);
author->set_underline_mode(LinkButton::UNDERLINE_MODE_ON_HOVER);
- author->connect("pressed", this, "_author_clicked");
+ author->connect_compat("pressed", this, "_author_clicked");
vb->add_child(author);
price = memnew(Label);
@@ -263,7 +263,7 @@ void EditorAssetLibraryItemDescription::add_preview(int p_id, bool p_video, cons
preview.button->set_flat(true);
preview.button->set_icon(get_icon("ThumbnailWait", "EditorIcons"));
preview.button->set_toggle_mode(true);
- preview.button->connect("pressed", this, "_preview_click", varray(p_id));
+ preview.button->connect_compat("pressed", this, "_preview_click", varray(p_id));
preview_hb->add_child(preview.button);
if (!p_video) {
preview.image = get_icon("ThumbnailWait", "EditorIcons");
@@ -290,7 +290,7 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {
description = memnew(RichTextLabel);
desc_vbox->add_child(description);
description->set_v_size_flags(SIZE_EXPAND_FILL);
- description->connect("meta_clicked", this, "_link_click");
+ description->connect_compat("meta_clicked", this, "_link_click");
description->add_constant_override("line_separation", Math::round(5 * EDSCALE));
VBoxContainer *previews_vbox = memnew(VBoxContainer);
@@ -526,7 +526,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
title->set_h_size_flags(SIZE_EXPAND_FILL);
dismiss = memnew(TextureButton);
- dismiss->connect("pressed", this, "_close");
+ dismiss->connect_compat("pressed", this, "_close");
title_hb->add_child(dismiss);
title->set_clip_text(true);
@@ -546,11 +546,11 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
install = memnew(Button);
install->set_text(TTR("Install..."));
install->set_disabled(true);
- install->connect("pressed", this, "_install");
+ install->connect_compat("pressed", this, "_install");
retry = memnew(Button);
retry->set_text(TTR("Retry"));
- retry->connect("pressed", this, "_make_request");
+ retry->connect_compat("pressed", this, "_make_request");
hb2->add_child(retry);
hb2->add_child(install);
@@ -558,7 +558,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
download = memnew(HTTPRequest);
add_child(download);
- download->connect("request_completed", this, "_http_download_completed");
+ download->connect_compat("request_completed", this, "_http_download_completed");
download->set_use_threads(EDITOR_DEF("asset_library/use_threads", true));
download_error = memnew(AcceptDialog);
@@ -567,7 +567,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
asset_installer = memnew(EditorAssetInstaller);
add_child(asset_installer);
- asset_installer->connect("confirmed", this, "_close");
+ asset_installer->connect_compat("confirmed", this, "_close");
prev_status = -1;
@@ -657,7 +657,7 @@ void EditorAssetLibrary::_install_asset() {
if (templates_only) {
download->set_external_install(true);
- download->connect("install_asset", this, "_install_external_asset");
+ download->connect_compat("install_asset", this, "_install_external_asset");
}
}
@@ -892,7 +892,7 @@ void EditorAssetLibrary::_request_image(ObjectID p_for, String p_image_url, Imag
iq.queue_id = ++last_queue_id;
iq.active = false;
- iq.request->connect("request_completed", this, "_image_request_completed", varray(iq.queue_id));
+ iq.request->connect_compat("request_completed", this, "_image_request_completed", varray(iq.queue_id));
image_queue[iq.queue_id] = iq;
@@ -991,7 +991,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
Button *first = memnew(Button);
first->set_text(TTR("First"));
if (p_page != 0) {
- first->connect("pressed", this, "_search", varray(0));
+ first->connect_compat("pressed", this, "_search", varray(0));
} else {
first->set_disabled(true);
first->set_focus_mode(Control::FOCUS_NONE);
@@ -1001,7 +1001,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
Button *prev = memnew(Button);
prev->set_text(TTR("Previous"));
if (p_page > 0) {
- prev->connect("pressed", this, "_search", varray(p_page - 1));
+ prev->connect_compat("pressed", this, "_search", varray(p_page - 1));
} else {
prev->set_disabled(true);
prev->set_focus_mode(Control::FOCUS_NONE);
@@ -1023,7 +1023,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
Button *current = memnew(Button);
current->set_text(itos(i + 1));
- current->connect("pressed", this, "_search", varray(i));
+ current->connect_compat("pressed", this, "_search", varray(i));
hbc->add_child(current);
}
@@ -1032,7 +1032,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
Button *next = memnew(Button);
next->set_text(TTR("Next"));
if (p_page < p_page_count - 1) {
- next->connect("pressed", this, "_search", varray(p_page + 1));
+ next->connect_compat("pressed", this, "_search", varray(p_page + 1));
} else {
next->set_disabled(true);
next->set_focus_mode(Control::FOCUS_NONE);
@@ -1043,7 +1043,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
Button *last = memnew(Button);
last->set_text(TTR("Last"));
if (p_page != p_page_count - 1) {
- last->connect("pressed", this, "_search", varray(p_page_count - 1));
+ last->connect_compat("pressed", this, "_search", varray(p_page_count - 1));
} else {
last->set_disabled(true);
last->set_focus_mode(Control::FOCUS_NONE);
@@ -1229,9 +1229,9 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
EditorAssetLibraryItem *item = memnew(EditorAssetLibraryItem);
asset_items->add_child(item);
item->configure(r["title"], r["asset_id"], category_map[r["category_id"]], r["category_id"], r["author"], r["author_id"], r["cost"]);
- item->connect("asset_selected", this, "_select_asset");
- item->connect("author_selected", this, "_select_author");
- item->connect("category_selected", this, "_select_category");
+ item->connect_compat("asset_selected", this, "_select_asset");
+ item->connect_compat("author_selected", this, "_select_author");
+ item->connect_compat("category_selected", this, "_select_category");
if (r.has("icon_url") && r["icon_url"] != "") {
_request_image(item->get_instance_id(), r["icon_url"], IMAGE_QUEUE_ICON, 0);
@@ -1262,7 +1262,7 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
description = memnew(EditorAssetLibraryItemDescription);
add_child(description);
description->popup_centered_minsize();
- description->connect("confirmed", this, "_install_asset");
+ description->connect_compat("confirmed", this, "_install_asset");
description->configure(r["title"], r["asset_id"], category_map[r["category_id"]], r["category_id"], r["author"], r["author_id"], r["cost"], r["version"], r["version_string"], r["description"], r["download_url"], r["browse_url"], r["download_hash"]);
@@ -1374,9 +1374,9 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
filter = memnew(LineEdit);
search_hb->add_child(filter);
filter->set_h_size_flags(SIZE_EXPAND_FILL);
- filter->connect("text_entered", this, "_search_text_entered");
+ filter->connect_compat("text_entered", this, "_search_text_entered");
search = memnew(Button(TTR("Search")));
- search->connect("pressed", this, "_search");
+ search->connect_compat("pressed", this, "_search");
search_hb->add_child(search);
if (!p_templates_only)
@@ -1385,12 +1385,12 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
Button *open_asset = memnew(Button);
open_asset->set_text(TTR("Import..."));
search_hb->add_child(open_asset);
- open_asset->connect("pressed", this, "_asset_open");
+ open_asset->connect_compat("pressed", this, "_asset_open");
Button *plugins = memnew(Button);
plugins->set_text(TTR("Plugins..."));
search_hb->add_child(plugins);
- plugins->connect("pressed", this, "_manage_plugins");
+ plugins->connect_compat("pressed", this, "_manage_plugins");
if (p_templates_only) {
open_asset->hide();
@@ -1409,7 +1409,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
search_hb2->add_child(sort);
sort->set_h_size_flags(SIZE_EXPAND_FILL);
- sort->connect("item_selected", this, "_rerun_search");
+ sort->connect_compat("item_selected", this, "_rerun_search");
search_hb2->add_child(memnew(VSeparator));
@@ -1418,7 +1418,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
categories->add_item(TTR("All"));
search_hb2->add_child(categories);
categories->set_h_size_flags(SIZE_EXPAND_FILL);
- categories->connect("item_selected", this, "_rerun_search");
+ categories->connect_compat("item_selected", this, "_rerun_search");
search_hb2->add_child(memnew(VSeparator));
@@ -1430,7 +1430,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
repository->add_item("localhost");
repository->set_item_metadata(1, "http://127.0.0.1/asset-library/api");
- repository->connect("item_selected", this, "_repository_changed");
+ repository->connect_compat("item_selected", this, "_repository_changed");
search_hb2->add_child(repository);
repository->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -1445,7 +1445,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
support->get_popup()->add_check_item(TTR("Testing"), SUPPORT_TESTING);
support->get_popup()->set_item_checked(SUPPORT_OFFICIAL, true);
support->get_popup()->set_item_checked(SUPPORT_COMMUNITY, true);
- support->get_popup()->connect("id_pressed", this, "_support_toggled");
+ support->get_popup()->connect_compat("id_pressed", this, "_support_toggled");
/////////
@@ -1501,7 +1501,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
request = memnew(HTTPRequest);
add_child(request);
request->set_use_threads(EDITOR_DEF("asset_library/use_threads", true));
- request->connect("request_completed", this, "_http_request_completed");
+ request->connect_compat("request_completed", this, "_http_request_completed");
last_queue_id = 0;
@@ -1534,7 +1534,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
asset_open->add_filter("*.zip ; " + TTR("Assets ZIP File"));
asset_open->set_mode(EditorFileDialog::MODE_OPEN_FILE);
add_child(asset_open);
- asset_open->connect("file_selected", this, "_asset_file_selected");
+ asset_open->connect_compat("file_selected", this, "_asset_file_selected");
asset_installer = NULL;
}
diff --git a/editor/plugins/audio_stream_editor_plugin.cpp b/editor/plugins/audio_stream_editor_plugin.cpp
index 60cb2ff54d..e4a9c38a99 100644
--- a/editor/plugins/audio_stream_editor_plugin.cpp
+++ b/editor/plugins/audio_stream_editor_plugin.cpp
@@ -39,7 +39,7 @@
void AudioStreamEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_READY) {
- AudioStreamPreviewGenerator::get_singleton()->connect("preview_updated", this, "_preview_changed");
+ AudioStreamPreviewGenerator::get_singleton()->connect_compat("preview_updated", this, "_preview_changed");
}
if (p_what == NOTIFICATION_THEME_CHANGED || p_what == NOTIFICATION_ENTER_TREE) {
@@ -214,7 +214,7 @@ AudioStreamEditor::AudioStreamEditor() {
_dragging = false;
_player = memnew(AudioStreamPlayer);
- _player->connect("finished", this, "_on_finished");
+ _player->connect_compat("finished", this, "_on_finished");
add_child(_player);
VBoxContainer *vbox = memnew(VBoxContainer);
@@ -223,13 +223,13 @@ AudioStreamEditor::AudioStreamEditor() {
_preview = memnew(ColorRect);
_preview->set_v_size_flags(SIZE_EXPAND_FILL);
- _preview->connect("draw", this, "_draw_preview");
+ _preview->connect_compat("draw", this, "_draw_preview");
vbox->add_child(_preview);
_indicator = memnew(Control);
_indicator->set_anchors_and_margins_preset(PRESET_WIDE);
- _indicator->connect("draw", this, "_draw_indicator");
- _indicator->connect("gui_input", this, "_on_input_indicator");
+ _indicator->connect_compat("draw", this, "_draw_indicator");
+ _indicator->connect_compat("gui_input", this, "_on_input_indicator");
_preview->add_child(_indicator);
HBoxContainer *hbox = memnew(HBoxContainer);
@@ -239,12 +239,12 @@ AudioStreamEditor::AudioStreamEditor() {
_play_button = memnew(ToolButton);
hbox->add_child(_play_button);
_play_button->set_focus_mode(Control::FOCUS_NONE);
- _play_button->connect("pressed", this, "_play");
+ _play_button->connect_compat("pressed", this, "_play");
_stop_button = memnew(ToolButton);
hbox->add_child(_stop_button);
_stop_button->set_focus_mode(Control::FOCUS_NONE);
- _stop_button->connect("pressed", this, "_stop");
+ _stop_button->connect_compat("pressed", this, "_stop");
_current_label = memnew(Label);
_current_label->set_align(Label::ALIGN_RIGHT);
diff --git a/editor/plugins/camera_editor_plugin.cpp b/editor/plugins/camera_editor_plugin.cpp
index 6f5bc69bd1..0440785eaf 100644
--- a/editor/plugins/camera_editor_plugin.cpp
+++ b/editor/plugins/camera_editor_plugin.cpp
@@ -81,7 +81,7 @@ CameraEditor::CameraEditor() {
preview->set_margin(MARGIN_RIGHT, 0);
preview->set_margin(MARGIN_TOP, 0);
preview->set_margin(MARGIN_BOTTOM, 10);
- preview->connect("pressed", this, "_pressed");
+ preview->connect_compat("pressed", this, "_pressed");
}
void CameraEditorPlugin::edit(Object *p_object) {
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index c5f6a88783..b91b346089 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -3891,10 +3891,10 @@ void CanvasItemEditor::_notification(int p_what) {
select_sb->set_default_margin(Margin(i), 4);
}
- AnimationPlayerEditor::singleton->get_track_editor()->connect("visibility_changed", this, "_keying_changed");
+ AnimationPlayerEditor::singleton->get_track_editor()->connect_compat("visibility_changed", this, "_keying_changed");
_keying_changed();
- get_tree()->connect("node_added", this, "_tree_changed", varray());
- get_tree()->connect("node_removed", this, "_tree_changed", varray());
+ get_tree()->connect_compat("node_added", this, "_tree_changed", varray());
+ get_tree()->connect_compat("node_removed", this, "_tree_changed", varray());
} else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
@@ -3902,8 +3902,8 @@ void CanvasItemEditor::_notification(int p_what) {
}
if (p_what == NOTIFICATION_EXIT_TREE) {
- get_tree()->disconnect("node_added", this, "_tree_changed");
- get_tree()->disconnect("node_removed", this, "_tree_changed");
+ get_tree()->disconnect_compat("node_added", this, "_tree_changed");
+ get_tree()->disconnect_compat("node_removed", this, "_tree_changed");
}
if (p_what == NOTIFICATION_ENTER_TREE || p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
@@ -4181,7 +4181,7 @@ void CanvasItemEditor::_popup_warning_temporarily(Control *p_control, const floa
Timer *timer;
if (!popup_temporarily_timers.has(p_control)) {
timer = memnew(Timer);
- timer->connect("timeout", this, "_popup_warning_depop", varray(p_control));
+ timer->connect_compat("timeout", this, "_popup_warning_depop", varray(p_control));
timer->set_one_shot(true);
add_child(timer);
@@ -5410,11 +5410,11 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
editor = p_editor;
editor_selection = p_editor->get_editor_selection();
editor_selection->add_editor_plugin(this);
- editor_selection->connect("selection_changed", this, "update");
- editor_selection->connect("selection_changed", this, "_selection_changed");
+ editor_selection->connect_compat("selection_changed", this, "update");
+ editor_selection->connect_compat("selection_changed", this, "_selection_changed");
- editor->call_deferred("connect", make_binds("play_pressed", this, "_update_override_camera_button", true));
- editor->call_deferred("connect", make_binds("stop_pressed", this, "_update_override_camera_button", false));
+ editor->call_deferred("connect", make_binds("play_pressed", Callable(this, "_update_override_camera_button"), true));
+ editor->call_deferred("connect", make_binds("stop_pressed", Callable(this, "_update_override_camera_button"), false));
hb = memnew(HBoxContainer);
add_child(hb);
@@ -5434,7 +5434,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
viewport_scrollable->set_clip_contents(true);
viewport_scrollable->set_v_size_flags(SIZE_EXPAND_FILL);
viewport_scrollable->set_h_size_flags(SIZE_EXPAND_FILL);
- viewport_scrollable->connect("draw", this, "_update_scrollbars");
+ viewport_scrollable->connect_compat("draw", this, "_update_scrollbars");
ViewportContainer *scene_tree = memnew(ViewportContainer);
viewport_scrollable->add_child(scene_tree);
@@ -5456,8 +5456,8 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
viewport->set_anchors_and_margins_preset(Control::PRESET_WIDE);
viewport->set_clip_contents(true);
viewport->set_focus_mode(FOCUS_ALL);
- viewport->connect("draw", this, "_draw_viewport");
- viewport->connect("gui_input", this, "_gui_input_viewport");
+ viewport->connect_compat("draw", this, "_draw_viewport");
+ viewport->connect_compat("gui_input", this, "_gui_input_viewport");
info_overlay = memnew(VBoxContainer);
info_overlay->set_anchors_and_margins_preset(Control::PRESET_BOTTOM_LEFT);
@@ -5485,25 +5485,25 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
h_scroll = memnew(HScrollBar);
viewport->add_child(h_scroll);
- h_scroll->connect("value_changed", this, "_update_scroll");
+ h_scroll->connect_compat("value_changed", this, "_update_scroll");
h_scroll->hide();
v_scroll = memnew(VScrollBar);
viewport->add_child(v_scroll);
- v_scroll->connect("value_changed", this, "_update_scroll");
+ v_scroll->connect_compat("value_changed", this, "_update_scroll");
v_scroll->hide();
viewport->add_child(controls_vb);
zoom_minus = memnew(ToolButton);
zoom_hb->add_child(zoom_minus);
- zoom_minus->connect("pressed", this, "_button_zoom_minus");
+ zoom_minus->connect_compat("pressed", this, "_button_zoom_minus");
zoom_minus->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_minus", TTR("Zoom Out"), KEY_MASK_CMD | KEY_MINUS));
zoom_minus->set_focus_mode(FOCUS_NONE);
zoom_reset = memnew(ToolButton);
zoom_hb->add_child(zoom_reset);
- zoom_reset->connect("pressed", this, "_button_zoom_reset");
+ zoom_reset->connect_compat("pressed", this, "_button_zoom_reset");
zoom_reset->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_reset", TTR("Zoom Reset"), KEY_MASK_CMD | KEY_0));
zoom_reset->set_focus_mode(FOCUS_NONE);
zoom_reset->set_text_align(Button::TextAlign::ALIGN_CENTER);
@@ -5512,7 +5512,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
zoom_plus = memnew(ToolButton);
zoom_hb->add_child(zoom_plus);
- zoom_plus->connect("pressed", this, "_button_zoom_plus");
+ zoom_plus->connect_compat("pressed", this, "_button_zoom_plus");
zoom_plus->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_plus", TTR("Zoom In"), KEY_MASK_CMD | KEY_EQUAL)); // Usually direct access key for PLUS
zoom_plus->set_focus_mode(FOCUS_NONE);
@@ -5521,7 +5521,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
select_button = memnew(ToolButton);
hb->add_child(select_button);
select_button->set_toggle_mode(true);
- select_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_SELECT));
+ select_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_SELECT));
select_button->set_pressed(true);
select_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/select_mode", TTR("Select Mode"), KEY_Q));
select_button->set_tooltip(keycode_get_string(KEY_MASK_CMD) + TTR("Drag: Rotate") + "\n" + TTR("Alt+Drag: Move") + "\n" + TTR("Press 'v' to Change Pivot, 'Shift+v' to Drag Pivot (while moving).") + "\n" + TTR("Alt+RMB: Depth list selection"));
@@ -5531,21 +5531,21 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
move_button = memnew(ToolButton);
hb->add_child(move_button);
move_button->set_toggle_mode(true);
- move_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_MOVE));
+ move_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_MOVE));
move_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/move_mode", TTR("Move Mode"), KEY_W));
move_button->set_tooltip(TTR("Move Mode"));
rotate_button = memnew(ToolButton);
hb->add_child(rotate_button);
rotate_button->set_toggle_mode(true);
- rotate_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_ROTATE));
+ rotate_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_ROTATE));
rotate_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/rotate_mode", TTR("Rotate Mode"), KEY_E));
rotate_button->set_tooltip(TTR("Rotate Mode"));
scale_button = memnew(ToolButton);
hb->add_child(scale_button);
scale_button->set_toggle_mode(true);
- scale_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_SCALE));
+ scale_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_SCALE));
scale_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/scale_mode", TTR("Scale Mode"), KEY_S));
scale_button->set_tooltip(TTR("Scale Mode"));
@@ -5554,25 +5554,25 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
list_select_button = memnew(ToolButton);
hb->add_child(list_select_button);
list_select_button->set_toggle_mode(true);
- list_select_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_LIST_SELECT));
+ list_select_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_LIST_SELECT));
list_select_button->set_tooltip(TTR("Show a list of all objects at the position clicked\n(same as Alt+RMB in select mode)."));
pivot_button = memnew(ToolButton);
hb->add_child(pivot_button);
pivot_button->set_toggle_mode(true);
- pivot_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_EDIT_PIVOT));
+ pivot_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_EDIT_PIVOT));
pivot_button->set_tooltip(TTR("Click to change object's rotation pivot."));
pan_button = memnew(ToolButton);
hb->add_child(pan_button);
pan_button->set_toggle_mode(true);
- pan_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_PAN));
+ pan_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_PAN));
pan_button->set_tooltip(TTR("Pan Mode"));
ruler_button = memnew(ToolButton);
hb->add_child(ruler_button);
ruler_button->set_toggle_mode(true);
- ruler_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_RULER));
+ ruler_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_RULER));
ruler_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/ruler_mode", TTR("Ruler Mode"), KEY_R));
ruler_button->set_tooltip(TTR("Ruler Mode"));
@@ -5581,14 +5581,14 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
smart_snap_button = memnew(ToolButton);
hb->add_child(smart_snap_button);
smart_snap_button->set_toggle_mode(true);
- smart_snap_button->connect("toggled", this, "_button_toggle_smart_snap");
+ smart_snap_button->connect_compat("toggled", this, "_button_toggle_smart_snap");
smart_snap_button->set_tooltip(TTR("Toggle smart snapping."));
smart_snap_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/use_smart_snap", TTR("Use Smart Snap"), KEY_MASK_SHIFT | KEY_S));
grid_snap_button = memnew(ToolButton);
hb->add_child(grid_snap_button);
grid_snap_button->set_toggle_mode(true);
- grid_snap_button->connect("toggled", this, "_button_toggle_grid_snap");
+ grid_snap_button->connect_compat("toggled", this, "_button_toggle_grid_snap");
grid_snap_button->set_tooltip(TTR("Toggle grid snapping."));
grid_snap_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/use_grid_snap", TTR("Use Grid Snap"), KEY_MASK_SHIFT | KEY_G));
@@ -5599,7 +5599,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
snap_config_menu->set_switch_on_hover(true);
PopupMenu *p = snap_config_menu->get_popup();
- p->connect("id_pressed", this, "_popup_callback");
+ p->connect_compat("id_pressed", this, "_popup_callback");
p->set_hide_on_checkable_item_selection(false);
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/use_rotation_snap", TTR("Use Rotation Snap")), SNAP_USE_ROTATION);
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/use_scale_snap", TTR("Use Scale Snap")), SNAP_USE_SCALE);
@@ -5613,7 +5613,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
smartsnap_config_popup = memnew(PopupMenu);
p->add_child(smartsnap_config_popup);
smartsnap_config_popup->set_name("SmartSnapping");
- smartsnap_config_popup->connect("id_pressed", this, "_popup_callback");
+ smartsnap_config_popup->connect_compat("id_pressed", this, "_popup_callback");
smartsnap_config_popup->set_hide_on_checkable_item_selection(false);
smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_node_parent", TTR("Snap to Parent")), SNAP_USE_NODE_PARENT);
smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_node_anchors", TTR("Snap to Node Anchor")), SNAP_USE_NODE_ANCHORS);
@@ -5627,22 +5627,22 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
lock_button = memnew(ToolButton);
hb->add_child(lock_button);
- lock_button->connect("pressed", this, "_popup_callback", varray(LOCK_SELECTED));
+ lock_button->connect_compat("pressed", this, "_popup_callback", varray(LOCK_SELECTED));
lock_button->set_tooltip(TTR("Lock the selected object in place (can't be moved)."));
unlock_button = memnew(ToolButton);
hb->add_child(unlock_button);
- unlock_button->connect("pressed", this, "_popup_callback", varray(UNLOCK_SELECTED));
+ unlock_button->connect_compat("pressed", this, "_popup_callback", varray(UNLOCK_SELECTED));
unlock_button->set_tooltip(TTR("Unlock the selected object (can be moved)."));
group_button = memnew(ToolButton);
hb->add_child(group_button);
- group_button->connect("pressed", this, "_popup_callback", varray(GROUP_SELECTED));
+ group_button->connect_compat("pressed", this, "_popup_callback", varray(GROUP_SELECTED));
group_button->set_tooltip(TTR("Makes sure the object's children are not selectable."));
ungroup_button = memnew(ToolButton);
hb->add_child(ungroup_button);
- ungroup_button->connect("pressed", this, "_popup_callback", varray(UNGROUP_SELECTED));
+ ungroup_button->connect_compat("pressed", this, "_popup_callback", varray(UNGROUP_SELECTED));
ungroup_button->set_tooltip(TTR("Restores the object's children's ability to be selected."));
hb->add_child(memnew(VSeparator));
@@ -5661,13 +5661,13 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
p->add_separator();
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_make_bones", TTR("Make Custom Bone(s) from Node(s)"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_B), SKELETON_MAKE_BONES);
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_clear_bones", TTR("Clear Custom Bones")), SKELETON_CLEAR_BONES);
- p->connect("id_pressed", this, "_popup_callback");
+ p->connect_compat("id_pressed", this, "_popup_callback");
hb->add_child(memnew(VSeparator));
override_camera_button = memnew(ToolButton);
hb->add_child(override_camera_button);
- override_camera_button->connect("toggled", this, "_button_override_camera");
+ override_camera_button->connect_compat("toggled", this, "_button_override_camera");
override_camera_button->set_toggle_mode(true);
override_camera_button->set_disabled(true);
_update_override_camera_button(false);
@@ -5677,7 +5677,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
view_menu = memnew(MenuButton);
view_menu->set_text(TTR("View"));
hb->add_child(view_menu);
- view_menu->get_popup()->connect("id_pressed", this, "_popup_callback");
+ view_menu->get_popup()->connect_compat("id_pressed", this, "_popup_callback");
view_menu->set_switch_on_hover(true);
p = view_menu->get_popup();
@@ -5705,18 +5705,18 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
presets_menu->set_switch_on_hover(true);
p = presets_menu->get_popup();
- p->connect("id_pressed", this, "_popup_callback");
+ p->connect_compat("id_pressed", this, "_popup_callback");
anchors_popup = memnew(PopupMenu);
p->add_child(anchors_popup);
anchors_popup->set_name("Anchors");
- anchors_popup->connect("id_pressed", this, "_popup_callback");
+ anchors_popup->connect_compat("id_pressed", this, "_popup_callback");
anchor_mode_button = memnew(ToolButton);
hb->add_child(anchor_mode_button);
anchor_mode_button->set_toggle_mode(true);
anchor_mode_button->hide();
- anchor_mode_button->connect("toggled", this, "_button_toggle_anchor_mode");
+ anchor_mode_button->connect_compat("toggled", this, "_button_toggle_anchor_mode");
animation_hb = memnew(HBoxContainer);
hb->add_child(animation_hb);
@@ -5728,7 +5728,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
key_loc_button->set_flat(true);
key_loc_button->set_pressed(true);
key_loc_button->set_focus_mode(FOCUS_NONE);
- key_loc_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_POS));
+ key_loc_button->connect_compat("pressed", this, "_popup_callback", varray(ANIM_INSERT_POS));
key_loc_button->set_tooltip(TTR("Translation mask for inserting keys."));
animation_hb->add_child(key_loc_button);
key_rot_button = memnew(Button);
@@ -5736,20 +5736,20 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
key_rot_button->set_flat(true);
key_rot_button->set_pressed(true);
key_rot_button->set_focus_mode(FOCUS_NONE);
- key_rot_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_ROT));
+ key_rot_button->connect_compat("pressed", this, "_popup_callback", varray(ANIM_INSERT_ROT));
key_rot_button->set_tooltip(TTR("Rotation mask for inserting keys."));
animation_hb->add_child(key_rot_button);
key_scale_button = memnew(Button);
key_scale_button->set_toggle_mode(true);
key_scale_button->set_flat(true);
key_scale_button->set_focus_mode(FOCUS_NONE);
- key_scale_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_SCALE));
+ key_scale_button->connect_compat("pressed", this, "_popup_callback", varray(ANIM_INSERT_SCALE));
key_scale_button->set_tooltip(TTR("Scale mask for inserting keys."));
animation_hb->add_child(key_scale_button);
key_insert_button = memnew(Button);
key_insert_button->set_flat(true);
key_insert_button->set_focus_mode(FOCUS_NONE);
- key_insert_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_KEY));
+ key_insert_button->connect_compat("pressed", this, "_popup_callback", varray(ANIM_INSERT_KEY));
key_insert_button->set_tooltip(TTR("Insert keys (based on mask)."));
key_insert_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/anim_insert_key", TTR("Insert Key"), KEY_INSERT));
animation_hb->add_child(key_insert_button);
@@ -5765,7 +5765,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
animation_menu = memnew(MenuButton);
animation_menu->set_tooltip(TTR("Animation Key and Pose Options"));
animation_hb->add_child(animation_menu);
- animation_menu->get_popup()->connect("id_pressed", this, "_popup_callback");
+ animation_menu->get_popup()->connect_compat("id_pressed", this, "_popup_callback");
animation_menu->set_switch_on_hover(true);
p = animation_menu->get_popup();
@@ -5778,7 +5778,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/anim_clear_pose", TTR("Clear Pose"), KEY_MASK_SHIFT | KEY_K), ANIM_CLEAR_POSE);
snap_dialog = memnew(SnapDialog);
- snap_dialog->connect("confirmed", this, "_snap_changed");
+ snap_dialog->connect_compat("confirmed", this, "_snap_changed");
add_child(snap_dialog);
select_sb = Ref<StyleBoxTexture>(memnew(StyleBoxTexture));
@@ -5786,8 +5786,8 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
selection_menu = memnew(PopupMenu);
add_child(selection_menu);
selection_menu->set_custom_minimum_size(Vector2(100, 0));
- selection_menu->connect("id_pressed", this, "_selection_result_pressed");
- selection_menu->connect("popup_hide", this, "_selection_menu_hide");
+ selection_menu->connect_compat("id_pressed", this, "_selection_result_pressed");
+ selection_menu->connect_compat("popup_hide", this, "_selection_menu_hide");
multiply_grid_step_shortcut = ED_SHORTCUT("canvas_item_editor/multiply_grid_step", TTR("Multiply grid step by 2"), KEY_KP_MULTIPLY);
divide_grid_step_shortcut = ED_SHORTCUT("canvas_item_editor/divide_grid_step", TTR("Divide grid step by 2"), KEY_KP_DIVIDE);
@@ -6234,11 +6234,11 @@ void CanvasItemEditorViewport::drop_data(const Point2 &p_point, const Variant &p
void CanvasItemEditorViewport::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
- connect("mouse_exited", this, "_on_mouse_exit");
+ connect_compat("mouse_exited", this, "_on_mouse_exit");
label->add_color_override("font_color", get_color("warning_color", "Editor"));
} break;
case NOTIFICATION_EXIT_TREE: {
- disconnect("mouse_exited", this, "_on_mouse_exit");
+ disconnect_compat("mouse_exited", this, "_on_mouse_exit");
} break;
default: break;
@@ -6276,8 +6276,8 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte
selector = memnew(AcceptDialog);
editor->get_gui_base()->add_child(selector);
selector->set_title(TTR("Change Default Type"));
- selector->connect("confirmed", this, "_on_change_type_confirmed");
- selector->connect("popup_hide", this, "_on_change_type_closed");
+ selector->connect_compat("confirmed", this, "_on_change_type_confirmed");
+ selector->connect_compat("popup_hide", this, "_on_change_type_closed");
VBoxContainer *vbc = memnew(VBoxContainer);
selector->add_child(vbc);
@@ -6294,7 +6294,7 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte
CheckBox *check = memnew(CheckBox);
btn_group->add_child(check);
check->set_text(types[i]);
- check->connect("button_down", this, "_on_select_type", varray(check));
+ check->connect_compat("button_down", this, "_on_select_type", varray(check));
check->set_button_group(button_group);
}
diff --git a/editor/plugins/collision_polygon_editor_plugin.cpp b/editor/plugins/collision_polygon_editor_plugin.cpp
index 9aa9b6cda5..59bbe031ed 100644
--- a/editor/plugins/collision_polygon_editor_plugin.cpp
+++ b/editor/plugins/collision_polygon_editor_plugin.cpp
@@ -47,7 +47,7 @@ void Polygon3DEditor::_notification(int p_what) {
button_create->set_icon(get_icon("Edit", "EditorIcons"));
button_edit->set_icon(get_icon("MovePoint", "EditorIcons"));
button_edit->set_pressed(true);
- get_tree()->connect("node_removed", this, "_node_removed");
+ get_tree()->connect_compat("node_removed", this, "_node_removed");
} break;
case NOTIFICATION_PROCESS: {
@@ -532,12 +532,12 @@ Polygon3DEditor::Polygon3DEditor(EditorNode *p_editor) {
add_child(memnew(VSeparator));
button_create = memnew(ToolButton);
add_child(button_create);
- button_create->connect("pressed", this, "_menu_option", varray(MODE_CREATE));
+ button_create->connect_compat("pressed", this, "_menu_option", varray(MODE_CREATE));
button_create->set_toggle_mode(true);
button_edit = memnew(ToolButton);
add_child(button_edit);
- button_edit->connect("pressed", this, "_menu_option", varray(MODE_EDIT));
+ button_edit->connect_compat("pressed", this, "_menu_option", varray(MODE_EDIT));
button_edit->set_toggle_mode(true);
mode = MODE_EDIT;
diff --git a/editor/plugins/cpu_particles_2d_editor_plugin.cpp b/editor/plugins/cpu_particles_2d_editor_plugin.cpp
index 80f5e26d48..ad3f01ec37 100644
--- a/editor/plugins/cpu_particles_2d_editor_plugin.cpp
+++ b/editor/plugins/cpu_particles_2d_editor_plugin.cpp
@@ -240,9 +240,9 @@ void CPUParticles2DEditorPlugin::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- menu->get_popup()->connect("id_pressed", this, "_menu_callback");
+ menu->get_popup()->connect_compat("id_pressed", this, "_menu_callback");
menu->set_icon(menu->get_popup()->get_icon("Particles2D", "EditorIcons"));
- file->connect("file_selected", this, "_file_selected");
+ file->connect_compat("file_selected", this, "_file_selected");
}
}
@@ -305,7 +305,7 @@ CPUParticles2DEditorPlugin::CPUParticles2DEditorPlugin(EditorNode *p_node) {
toolbar->add_child(emission_mask);
- emission_mask->connect("confirmed", this, "_generate_emission_mask");
+ emission_mask->connect_compat("confirmed", this, "_generate_emission_mask");
}
CPUParticles2DEditorPlugin::~CPUParticles2DEditorPlugin() {
diff --git a/editor/plugins/cpu_particles_editor_plugin.cpp b/editor/plugins/cpu_particles_editor_plugin.cpp
index be3e9cd8e0..8a73ae1e1f 100644
--- a/editor/plugins/cpu_particles_editor_plugin.cpp
+++ b/editor/plugins/cpu_particles_editor_plugin.cpp
@@ -116,7 +116,7 @@ CPUParticlesEditor::CPUParticlesEditor() {
options->get_popup()->add_item(TTR("Create Emission Points From Node"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE);
options->get_popup()->add_separator();
options->get_popup()->add_item(TTR("Restart"), MENU_OPTION_RESTART);
- options->get_popup()->connect("id_pressed", this, "_menu_option");
+ options->get_popup()->connect_compat("id_pressed", this, "_menu_option");
}
void CPUParticlesEditorPlugin::edit(Object *p_object) {
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index 62a3ff9b58..5f4fb19d9e 100644
--- a/editor/plugins/curve_editor_plugin.cpp
+++ b/editor/plugins/curve_editor_plugin.cpp
@@ -49,7 +49,7 @@ CurveEditor::CurveEditor() {
set_clip_contents(true);
_context_menu = memnew(PopupMenu);
- _context_menu->connect("id_pressed", this, "_on_context_menu_item_selected");
+ _context_menu->connect_compat("id_pressed", this, "_on_context_menu_item_selected");
add_child(_context_menu);
_presets_menu = memnew(PopupMenu);
@@ -60,7 +60,7 @@ CurveEditor::CurveEditor() {
_presets_menu->add_item(TTR("Ease In"), PRESET_EASE_IN);
_presets_menu->add_item(TTR("Ease Out"), PRESET_EASE_OUT);
_presets_menu->add_item(TTR("Smoothstep"), PRESET_SMOOTHSTEP);
- _presets_menu->connect("id_pressed", this, "_on_preset_item_selected");
+ _presets_menu->connect_compat("id_pressed", this, "_on_preset_item_selected");
_context_menu->add_child(_presets_menu);
}
@@ -70,15 +70,15 @@ void CurveEditor::set_curve(Ref<Curve> curve) {
return;
if (_curve_ref.is_valid()) {
- _curve_ref->disconnect(CoreStringNames::get_singleton()->changed, this, "_curve_changed");
- _curve_ref->disconnect(Curve::SIGNAL_RANGE_CHANGED, this, "_curve_changed");
+ _curve_ref->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_curve_changed");
+ _curve_ref->disconnect_compat(Curve::SIGNAL_RANGE_CHANGED, this, "_curve_changed");
}
_curve_ref = curve;
if (_curve_ref.is_valid()) {
- _curve_ref->connect(CoreStringNames::get_singleton()->changed, this, "_curve_changed");
- _curve_ref->connect(Curve::SIGNAL_RANGE_CHANGED, this, "_curve_changed");
+ _curve_ref->connect_compat(CoreStringNames::get_singleton()->changed, this, "_curve_changed");
+ _curve_ref->connect_compat(Curve::SIGNAL_RANGE_CHANGED, this, "_curve_changed");
}
_selected_point = -1;
diff --git a/editor/plugins/gi_probe_editor_plugin.cpp b/editor/plugins/gi_probe_editor_plugin.cpp
index fe2c0d33b7..9231d38a02 100644
--- a/editor/plugins/gi_probe_editor_plugin.cpp
+++ b/editor/plugins/gi_probe_editor_plugin.cpp
@@ -147,7 +147,7 @@ GIProbeEditorPlugin::GIProbeEditorPlugin(EditorNode *p_node) {
bake = memnew(ToolButton);
bake->set_icon(editor->get_gui_base()->get_icon("Bake", "EditorIcons"));
bake->set_text(TTR("Bake GI Probe"));
- bake->connect("pressed", this, "_bake");
+ bake->connect_compat("pressed", this, "_bake");
bake_hb->add_child(bake);
bake_info = memnew(Label);
bake_info->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -159,7 +159,7 @@ GIProbeEditorPlugin::GIProbeEditorPlugin(EditorNode *p_node) {
probe_file = memnew(EditorFileDialog);
probe_file->set_mode(EditorFileDialog::MODE_SAVE_FILE);
probe_file->add_filter("*.res");
- probe_file->connect("file_selected", this, "_giprobe_save_path_and_bake");
+ probe_file->connect_compat("file_selected", this, "_giprobe_save_path_and_bake");
get_editor_interface()->get_base_control()->add_child(probe_file);
probe_file->set_title(TTR("Select path for GIProbe Data File"));
diff --git a/editor/plugins/gradient_editor_plugin.cpp b/editor/plugins/gradient_editor_plugin.cpp
index 0a3a994eb7..b36782ee14 100644
--- a/editor/plugins/gradient_editor_plugin.cpp
+++ b/editor/plugins/gradient_editor_plugin.cpp
@@ -69,8 +69,8 @@ void GradientEditor::_bind_methods() {
void GradientEditor::set_gradient(const Ref<Gradient> &p_gradient) {
gradient = p_gradient;
- connect("ramp_changed", this, "_ramp_changed");
- gradient->connect("changed", this, "_gradient_changed");
+ connect_compat("ramp_changed", this, "_ramp_changed");
+ gradient->connect_compat("changed", this, "_gradient_changed");
set_points(gradient->get_points());
}
diff --git a/editor/plugins/item_list_editor_plugin.cpp b/editor/plugins/item_list_editor_plugin.cpp
index b7dfe97081..b872a2d932 100644
--- a/editor/plugins/item_list_editor_plugin.cpp
+++ b/editor/plugins/item_list_editor_plugin.cpp
@@ -268,7 +268,7 @@ void ItemListEditor::_notification(int p_notification) {
del_button->set_icon(get_icon("Remove", "EditorIcons"));
} else if (p_notification == NOTIFICATION_READY) {
- get_tree()->connect("node_removed", this, "_node_removed");
+ get_tree()->connect_compat("node_removed", this, "_node_removed");
}
}
@@ -359,7 +359,7 @@ ItemListEditor::ItemListEditor() {
toolbar_button = memnew(ToolButton);
toolbar_button->set_text(TTR("Items"));
add_child(toolbar_button);
- toolbar_button->connect("pressed", this, "_edit_items");
+ toolbar_button->connect_compat("pressed", this, "_edit_items");
dialog = memnew(AcceptDialog);
dialog->set_title(TTR("Item List Editor"));
@@ -376,14 +376,14 @@ ItemListEditor::ItemListEditor() {
add_button = memnew(Button);
add_button->set_text(TTR("Add"));
hbc->add_child(add_button);
- add_button->connect("pressed", this, "_add_button");
+ add_button->connect_compat("pressed", this, "_add_button");
hbc->add_spacer();
del_button = memnew(Button);
del_button->set_text(TTR("Delete"));
hbc->add_child(del_button);
- del_button->connect("pressed", this, "_delete_button");
+ del_button->connect_compat("pressed", this, "_delete_button");
property_editor = memnew(EditorInspector);
vbc->add_child(property_editor);
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index 4e44082853..bca0bde441 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -171,13 +171,13 @@ MaterialEditor::MaterialEditor() {
sphere_switch->set_toggle_mode(true);
sphere_switch->set_pressed(true);
vb_shape->add_child(sphere_switch);
- sphere_switch->connect("pressed", this, "_button_pressed", varray(sphere_switch));
+ sphere_switch->connect_compat("pressed", this, "_button_pressed", varray(sphere_switch));
box_switch = memnew(TextureButton);
box_switch->set_toggle_mode(true);
box_switch->set_pressed(false);
vb_shape->add_child(box_switch);
- box_switch->connect("pressed", this, "_button_pressed", varray(box_switch));
+ box_switch->connect_compat("pressed", this, "_button_pressed", varray(box_switch));
hb->add_spacer();
@@ -187,12 +187,12 @@ MaterialEditor::MaterialEditor() {
light_1_switch = memnew(TextureButton);
light_1_switch->set_toggle_mode(true);
vb_light->add_child(light_1_switch);
- light_1_switch->connect("pressed", this, "_button_pressed", varray(light_1_switch));
+ light_1_switch->connect_compat("pressed", this, "_button_pressed", varray(light_1_switch));
light_2_switch = memnew(TextureButton);
light_2_switch->set_toggle_mode(true);
vb_light->add_child(light_2_switch);
- light_2_switch->connect("pressed", this, "_button_pressed", varray(light_2_switch));
+ light_2_switch->connect_compat("pressed", this, "_button_pressed", varray(light_2_switch));
first_enter = true;
}
diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp
index d06e5b6349..2b25a2328c 100644
--- a/editor/plugins/mesh_editor_plugin.cpp
+++ b/editor/plugins/mesh_editor_plugin.cpp
@@ -157,12 +157,12 @@ MeshEditor::MeshEditor() {
light_1_switch = memnew(TextureButton);
light_1_switch->set_toggle_mode(true);
vb_light->add_child(light_1_switch);
- light_1_switch->connect("pressed", this, "_button_pressed", varray(light_1_switch));
+ light_1_switch->connect_compat("pressed", this, "_button_pressed", varray(light_1_switch));
light_2_switch = memnew(TextureButton);
light_2_switch->set_toggle_mode(true);
vb_light->add_child(light_2_switch);
- light_2_switch->connect("pressed", this, "_button_pressed", varray(light_2_switch));
+ light_2_switch->connect_compat("pressed", this, "_button_pressed", varray(light_2_switch));
first_enter = true;
diff --git a/editor/plugins/mesh_instance_editor_plugin.cpp b/editor/plugins/mesh_instance_editor_plugin.cpp
index 574646956e..182a8600e4 100644
--- a/editor/plugins/mesh_instance_editor_plugin.cpp
+++ b/editor/plugins/mesh_instance_editor_plugin.cpp
@@ -469,7 +469,7 @@ MeshInstanceEditor::MeshInstanceEditor() {
options->get_popup()->add_item(TTR("View UV2"), MENU_OPTION_DEBUG_UV2);
options->get_popup()->add_item(TTR("Unwrap UV2 for Lightmap/AO"), MENU_OPTION_CREATE_UV2);
- options->get_popup()->connect("id_pressed", this, "_menu_option");
+ options->get_popup()->connect_compat("id_pressed", this, "_menu_option");
outline_dialog = memnew(ConfirmationDialog);
outline_dialog->set_title(TTR("Create Outline Mesh"));
@@ -487,7 +487,7 @@ MeshInstanceEditor::MeshInstanceEditor() {
outline_dialog_vbc->add_margin_child(TTR("Outline Size:"), outline_size);
add_child(outline_dialog);
- outline_dialog->connect("confirmed", this, "_create_outline_mesh");
+ outline_dialog->connect_compat("confirmed", this, "_create_outline_mesh");
err_dialog = memnew(AcceptDialog);
add_child(err_dialog);
@@ -497,7 +497,7 @@ MeshInstanceEditor::MeshInstanceEditor() {
add_child(debug_uv_dialog);
debug_uv = memnew(Control);
debug_uv->set_custom_minimum_size(Size2(600, 600) * EDSCALE);
- debug_uv->connect("draw", this, "_debug_uv_draw");
+ debug_uv->connect_compat("draw", this, "_debug_uv_draw");
debug_uv_dialog->add_child(debug_uv);
}
diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp
index b77cb6453f..ea8842a56f 100644
--- a/editor/plugins/mesh_library_editor_plugin.cpp
+++ b/editor/plugins/mesh_library_editor_plugin.cpp
@@ -268,7 +268,7 @@ MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) {
file->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper());
}
add_child(file);
- file->connect("file_selected", this, "_import_scene_cbk");
+ file->connect_compat("file_selected", this, "_import_scene_cbk");
menu = memnew(MenuButton);
SpatialEditor::get_singleton()->add_control_to_menu_panel(menu);
@@ -281,13 +281,13 @@ MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) {
menu->get_popup()->add_item(TTR("Import from Scene"), MENU_OPTION_IMPORT_FROM_SCENE);
menu->get_popup()->add_item(TTR("Update from Scene"), MENU_OPTION_UPDATE_FROM_SCENE);
menu->get_popup()->set_item_disabled(menu->get_popup()->get_item_index(MENU_OPTION_UPDATE_FROM_SCENE), true);
- menu->get_popup()->connect("id_pressed", this, "_menu_cbk");
+ menu->get_popup()->connect_compat("id_pressed", this, "_menu_cbk");
menu->hide();
editor = p_editor;
cd = memnew(ConfirmationDialog);
add_child(cd);
- cd->get_ok()->connect("pressed", this, "_menu_confirm");
+ cd->get_ok()->connect_compat("pressed", this, "_menu_confirm");
}
void MeshLibraryEditorPlugin::edit(Object *p_node) {
diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp
index 4b7fd6399b..b2ce01b8d8 100644
--- a/editor/plugins/multimesh_editor_plugin.cpp
+++ b/editor/plugins/multimesh_editor_plugin.cpp
@@ -295,7 +295,7 @@ MultiMeshEditor::MultiMeshEditor() {
options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("MultiMeshInstance", "EditorIcons"));
options->get_popup()->add_item(TTR("Populate Surface"));
- options->get_popup()->connect("id_pressed", this, "_menu_option");
+ options->get_popup()->connect_compat("id_pressed", this, "_menu_option");
populate_dialog = memnew(ConfirmationDialog);
populate_dialog->set_title(TTR("Populate MultiMesh"));
@@ -313,7 +313,7 @@ MultiMeshEditor::MultiMeshEditor() {
Button *b = memnew(Button);
hbc->add_child(b);
b->set_text("..");
- b->connect("pressed", this, "_browse", make_binds(false));
+ b->connect_compat("pressed", this, "_browse", make_binds(false));
vbc->add_margin_child(TTR("Target Surface:"), hbc);
@@ -325,7 +325,7 @@ MultiMeshEditor::MultiMeshEditor() {
hbc->add_child(b);
b->set_text("..");
vbc->add_margin_child(TTR("Source Mesh:"), hbc);
- b->connect("pressed", this, "_browse", make_binds(true));
+ b->connect_compat("pressed", this, "_browse", make_binds(true));
populate_axis = memnew(OptionButton);
populate_axis->add_item(TTR("X-Axis"));
@@ -371,10 +371,10 @@ MultiMeshEditor::MultiMeshEditor() {
populate_dialog->get_ok()->set_text(TTR("Populate"));
- populate_dialog->get_ok()->connect("pressed", this, "_populate");
+ populate_dialog->get_ok()->connect_compat("pressed", this, "_populate");
std = memnew(SceneTreeDialog);
populate_dialog->add_child(std);
- std->connect("selected", this, "_browsed");
+ std->connect_compat("selected", this, "_browsed");
_last_pp_node = NULL;
diff --git a/editor/plugins/particles_2d_editor_plugin.cpp b/editor/plugins/particles_2d_editor_plugin.cpp
index 2e149a0f65..ab23cb9054 100644
--- a/editor/plugins/particles_2d_editor_plugin.cpp
+++ b/editor/plugins/particles_2d_editor_plugin.cpp
@@ -349,9 +349,9 @@ void Particles2DEditorPlugin::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- menu->get_popup()->connect("id_pressed", this, "_menu_callback");
+ menu->get_popup()->connect_compat("id_pressed", this, "_menu_callback");
menu->set_icon(menu->get_popup()->get_icon("Particles2D", "EditorIcons"));
- file->connect("file_selected", this, "_file_selected");
+ file->connect_compat("file_selected", this, "_file_selected");
}
}
@@ -416,7 +416,7 @@ Particles2DEditorPlugin::Particles2DEditorPlugin(EditorNode *p_node) {
toolbar->add_child(generate_visibility_rect);
- generate_visibility_rect->connect("confirmed", this, "_generate_visibility_rect");
+ generate_visibility_rect->connect_compat("confirmed", this, "_generate_visibility_rect");
emission_mask = memnew(ConfirmationDialog);
emission_mask->set_title(TTR("Load Emission Mask"));
@@ -433,7 +433,7 @@ Particles2DEditorPlugin::Particles2DEditorPlugin(EditorNode *p_node) {
toolbar->add_child(emission_mask);
- emission_mask->connect("confirmed", this, "_generate_emission_mask");
+ emission_mask->connect_compat("confirmed", this, "_generate_emission_mask");
}
Particles2DEditorPlugin::~Particles2DEditorPlugin() {
diff --git a/editor/plugins/particles_editor_plugin.cpp b/editor/plugins/particles_editor_plugin.cpp
index 940874846f..cea2182ae9 100644
--- a/editor/plugins/particles_editor_plugin.cpp
+++ b/editor/plugins/particles_editor_plugin.cpp
@@ -229,14 +229,14 @@ ParticlesEditorBase::ParticlesEditorBase() {
emd_vb->add_margin_child(TTR("Emission Source: "), emission_fill);
emission_dialog->get_ok()->set_text(TTR("Create"));
- emission_dialog->connect("confirmed", this, "_generate_emission_points");
+ emission_dialog->connect_compat("confirmed", this, "_generate_emission_points");
emission_file_dialog = memnew(EditorFileDialog);
add_child(emission_file_dialog);
- emission_file_dialog->connect("file_selected", this, "_resource_seleted");
+ emission_file_dialog->connect_compat("file_selected", this, "_resource_seleted");
emission_tree_dialog = memnew(SceneTreeDialog);
add_child(emission_tree_dialog);
- emission_tree_dialog->connect("selected", this, "_node_selected");
+ emission_tree_dialog->connect_compat("selected", this, "_node_selected");
List<String> extensions;
ResourceLoader::get_recognized_extensions_for_type("Mesh", &extensions);
@@ -262,7 +262,7 @@ void ParticlesEditor::_notification(int p_notification) {
if (p_notification == NOTIFICATION_ENTER_TREE) {
options->set_icon(options->get_popup()->get_icon("Particles", "EditorIcons"));
- get_tree()->connect("node_removed", this, "_node_removed");
+ get_tree()->connect_compat("node_removed", this, "_node_removed");
}
}
@@ -474,7 +474,7 @@ ParticlesEditor::ParticlesEditor() {
options->get_popup()->add_separator();
options->get_popup()->add_item(TTR("Restart"), MENU_OPTION_RESTART);
- options->get_popup()->connect("id_pressed", this, "_menu_option");
+ options->get_popup()->connect_compat("id_pressed", this, "_menu_option");
generate_aabb = memnew(ConfirmationDialog);
generate_aabb->set_title(TTR("Generate Visibility AABB"));
@@ -488,7 +488,7 @@ ParticlesEditor::ParticlesEditor() {
add_child(generate_aabb);
- generate_aabb->connect("confirmed", this, "_generate_aabb");
+ generate_aabb->connect_compat("confirmed", this, "_generate_aabb");
}
void ParticlesEditorPlugin::edit(Object *p_object) {
diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp
index 383dada590..e642233c64 100644
--- a/editor/plugins/path_2d_editor_plugin.cpp
+++ b/editor/plugins/path_2d_editor_plugin.cpp
@@ -441,14 +441,14 @@ void Path2DEditor::edit(Node *p_path2d) {
if (p_path2d) {
node = Object::cast_to<Path2D>(p_path2d);
- if (!node->is_connected("visibility_changed", this, "_node_visibility_changed"))
- node->connect("visibility_changed", this, "_node_visibility_changed");
+ if (!node->is_connected_compat("visibility_changed", this, "_node_visibility_changed"))
+ node->connect_compat("visibility_changed", this, "_node_visibility_changed");
} else {
// node may have been deleted at this point
- if (node && node->is_connected("visibility_changed", this, "_node_visibility_changed"))
- node->disconnect("visibility_changed", this, "_node_visibility_changed");
+ if (node && node->is_connected_compat("visibility_changed", this, "_node_visibility_changed"))
+ node->disconnect_compat("visibility_changed", this, "_node_visibility_changed");
node = NULL;
}
}
@@ -555,34 +555,34 @@ Path2DEditor::Path2DEditor(EditorNode *p_editor) {
curve_edit->set_toggle_mode(true);
curve_edit->set_focus_mode(Control::FOCUS_NONE);
curve_edit->set_tooltip(TTR("Select Points") + "\n" + TTR("Shift+Drag: Select Control Points") + "\n" + keycode_get_string(KEY_MASK_CMD) + TTR("Click: Add Point") + "\n" + TTR("Left Click: Split Segment (in curve)") + "\n" + TTR("Right Click: Delete Point"));
- curve_edit->connect("pressed", this, "_mode_selected", varray(MODE_EDIT));
+ curve_edit->connect_compat("pressed", this, "_mode_selected", varray(MODE_EDIT));
base_hb->add_child(curve_edit);
curve_edit_curve = memnew(ToolButton);
curve_edit_curve->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("CurveCurve", "EditorIcons"));
curve_edit_curve->set_toggle_mode(true);
curve_edit_curve->set_focus_mode(Control::FOCUS_NONE);
curve_edit_curve->set_tooltip(TTR("Select Control Points (Shift+Drag)"));
- curve_edit_curve->connect("pressed", this, "_mode_selected", varray(MODE_EDIT_CURVE));
+ curve_edit_curve->connect_compat("pressed", this, "_mode_selected", varray(MODE_EDIT_CURVE));
base_hb->add_child(curve_edit_curve);
curve_create = memnew(ToolButton);
curve_create->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("CurveCreate", "EditorIcons"));
curve_create->set_toggle_mode(true);
curve_create->set_focus_mode(Control::FOCUS_NONE);
curve_create->set_tooltip(TTR("Add Point (in empty space)"));
- curve_create->connect("pressed", this, "_mode_selected", varray(MODE_CREATE));
+ curve_create->connect_compat("pressed", this, "_mode_selected", varray(MODE_CREATE));
base_hb->add_child(curve_create);
curve_del = memnew(ToolButton);
curve_del->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("CurveDelete", "EditorIcons"));
curve_del->set_toggle_mode(true);
curve_del->set_focus_mode(Control::FOCUS_NONE);
curve_del->set_tooltip(TTR("Delete Point"));
- curve_del->connect("pressed", this, "_mode_selected", varray(MODE_DELETE));
+ curve_del->connect_compat("pressed", this, "_mode_selected", varray(MODE_DELETE));
base_hb->add_child(curve_del);
curve_close = memnew(ToolButton);
curve_close->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("CurveClose", "EditorIcons"));
curve_close->set_focus_mode(Control::FOCUS_NONE);
curve_close->set_tooltip(TTR("Close Curve"));
- curve_close->connect("pressed", this, "_mode_selected", varray(ACTION_CLOSE));
+ curve_close->connect_compat("pressed", this, "_mode_selected", varray(ACTION_CLOSE));
base_hb->add_child(curve_close);
PopupMenu *menu;
@@ -596,7 +596,7 @@ Path2DEditor::Path2DEditor(EditorNode *p_editor) {
menu->set_item_checked(HANDLE_OPTION_ANGLE, mirror_handle_angle);
menu->add_check_item(TTR("Mirror Handle Lengths"));
menu->set_item_checked(HANDLE_OPTION_LENGTH, mirror_handle_length);
- menu->connect("id_pressed", this, "_handle_option_pressed");
+ menu->connect_compat("id_pressed", this, "_handle_option_pressed");
base_hb->hide();
diff --git a/editor/plugins/path_editor_plugin.cpp b/editor/plugins/path_editor_plugin.cpp
index 75c9776f0f..b955bf7f41 100644
--- a/editor/plugins/path_editor_plugin.cpp
+++ b/editor/plugins/path_editor_plugin.cpp
@@ -543,10 +543,10 @@ void PathEditorPlugin::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- curve_create->connect("pressed", this, "_mode_changed", make_binds(0));
- curve_edit->connect("pressed", this, "_mode_changed", make_binds(1));
- curve_del->connect("pressed", this, "_mode_changed", make_binds(2));
- curve_close->connect("pressed", this, "_close_curve");
+ curve_create->connect_compat("pressed", this, "_mode_changed", make_binds(0));
+ curve_edit->connect_compat("pressed", this, "_mode_changed", make_binds(1));
+ curve_del->connect_compat("pressed", this, "_mode_changed", make_binds(2));
+ curve_close->connect_compat("pressed", this, "_close_curve");
}
}
@@ -614,7 +614,7 @@ PathEditorPlugin::PathEditorPlugin(EditorNode *p_node) {
menu->set_item_checked(HANDLE_OPTION_ANGLE, mirror_handle_angle);
menu->add_check_item(TTR("Mirror Handle Lengths"));
menu->set_item_checked(HANDLE_OPTION_LENGTH, mirror_handle_length);
- menu->connect("id_pressed", this, "_handle_option_pressed");
+ menu->connect_compat("id_pressed", this, "_handle_option_pressed");
curve_edit->set_pressed(true);
/*
diff --git a/editor/plugins/physical_bone_plugin.cpp b/editor/plugins/physical_bone_plugin.cpp
index 28099a927b..4b63d82961 100644
--- a/editor/plugins/physical_bone_plugin.cpp
+++ b/editor/plugins/physical_bone_plugin.cpp
@@ -64,7 +64,7 @@ PhysicalBoneEditor::PhysicalBoneEditor(EditorNode *p_editor) :
button_transform_joint->set_text(TTR("Move Joint"));
button_transform_joint->set_icon(SpatialEditor::get_singleton()->get_icon("PhysicalBone", "EditorIcons"));
button_transform_joint->set_toggle_mode(true);
- button_transform_joint->connect("toggled", this, "_on_toggle_button_transform_joint");
+ button_transform_joint->connect_compat("toggled", this, "_on_toggle_button_transform_joint");
hide();
}
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index 8b0adbafa2..91c0222f6d 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -192,7 +192,7 @@ void Polygon2DEditor::_update_bone_list() {
if (np == selected || bone_scroll_vb->get_child_count() < 2)
cb->set_pressed(true);
- cb->connect("pressed", this, "_bone_paint_selected", varray(i));
+ cb->connect_compat("pressed", this, "_bone_paint_selected", varray(i));
}
uv_edit_draw->update();
@@ -1273,14 +1273,14 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
button_uv = memnew(ToolButton);
add_child(button_uv);
button_uv->set_tooltip(TTR("Open Polygon 2D UV editor."));
- button_uv->connect("pressed", this, "_menu_option", varray(MODE_EDIT_UV));
+ button_uv->connect_compat("pressed", this, "_menu_option", varray(MODE_EDIT_UV));
uv_mode = UV_MODE_EDIT_POINT;
uv_edit = memnew(AcceptDialog);
add_child(uv_edit);
uv_edit->set_title(TTR("Polygon 2D UV Editor"));
uv_edit->set_resizable(true);
- uv_edit->connect("popup_hide", this, "_uv_edit_popup_hide");
+ uv_edit->connect_compat("popup_hide", this, "_uv_edit_popup_hide");
VBoxContainer *uv_main_vb = memnew(VBoxContainer);
uv_edit->add_child(uv_main_vb);
@@ -1312,10 +1312,10 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
uv_edit_mode[2]->set_button_group(uv_edit_group);
uv_edit_mode[3]->set_button_group(uv_edit_group);
- uv_edit_mode[0]->connect("pressed", this, "_uv_edit_mode_select", varray(0));
- uv_edit_mode[1]->connect("pressed", this, "_uv_edit_mode_select", varray(1));
- uv_edit_mode[2]->connect("pressed", this, "_uv_edit_mode_select", varray(2));
- uv_edit_mode[3]->connect("pressed", this, "_uv_edit_mode_select", varray(3));
+ uv_edit_mode[0]->connect_compat("pressed", this, "_uv_edit_mode_select", varray(0));
+ uv_edit_mode[1]->connect_compat("pressed", this, "_uv_edit_mode_select", varray(1));
+ uv_edit_mode[2]->connect_compat("pressed", this, "_uv_edit_mode_select", varray(2));
+ uv_edit_mode[3]->connect_compat("pressed", this, "_uv_edit_mode_select", varray(3));
uv_mode_hb->add_child(memnew(VSeparator));
@@ -1325,7 +1325,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
uv_button[i] = memnew(ToolButton);
uv_button[i]->set_toggle_mode(true);
uv_mode_hb->add_child(uv_button[i]);
- uv_button[i]->connect("pressed", this, "_uv_mode", varray(i));
+ uv_button[i]->connect_compat("pressed", this, "_uv_mode", varray(i));
uv_button[i]->set_focus_mode(FOCUS_NONE);
}
@@ -1388,7 +1388,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
uv_menu->get_popup()->add_item(TTR("Clear UV"), UVEDIT_UV_CLEAR);
uv_menu->get_popup()->add_separator();
uv_menu->get_popup()->add_item(TTR("Grid Settings"), UVEDIT_GRID_SETTINGS);
- uv_menu->get_popup()->connect("id_pressed", this, "_menu_option");
+ uv_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option");
uv_mode_hb->add_child(memnew(VSeparator));
@@ -1399,7 +1399,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
b_snap_enable->set_toggle_mode(true);
b_snap_enable->set_pressed(use_snap);
b_snap_enable->set_tooltip(TTR("Enable Snap"));
- b_snap_enable->connect("toggled", this, "_set_use_snap");
+ b_snap_enable->connect_compat("toggled", this, "_set_use_snap");
b_snap_grid = memnew(ToolButton);
uv_mode_hb->add_child(b_snap_grid);
@@ -1408,7 +1408,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
b_snap_grid->set_toggle_mode(true);
b_snap_grid->set_pressed(snap_show_grid);
b_snap_grid->set_tooltip(TTR("Show Grid"));
- b_snap_grid->connect("toggled", this, "_set_show_grid");
+ b_snap_grid->connect_compat("toggled", this, "_set_show_grid");
grid_settings = memnew(AcceptDialog);
grid_settings->set_title(TTR("Configure Grid:"));
@@ -1422,7 +1422,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
sb_off_x->set_step(1);
sb_off_x->set_value(snap_offset.x);
sb_off_x->set_suffix("px");
- sb_off_x->connect("value_changed", this, "_set_snap_off_x");
+ sb_off_x->connect_compat("value_changed", this, "_set_snap_off_x");
grid_settings_vb->add_margin_child(TTR("Grid Offset X:"), sb_off_x);
SpinBox *sb_off_y = memnew(SpinBox);
@@ -1431,7 +1431,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
sb_off_y->set_step(1);
sb_off_y->set_value(snap_offset.y);
sb_off_y->set_suffix("px");
- sb_off_y->connect("value_changed", this, "_set_snap_off_y");
+ sb_off_y->connect_compat("value_changed", this, "_set_snap_off_y");
grid_settings_vb->add_margin_child(TTR("Grid Offset Y:"), sb_off_y);
SpinBox *sb_step_x = memnew(SpinBox);
@@ -1440,7 +1440,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
sb_step_x->set_step(1);
sb_step_x->set_value(snap_step.x);
sb_step_x->set_suffix("px");
- sb_step_x->connect("value_changed", this, "_set_snap_step_x");
+ sb_step_x->connect_compat("value_changed", this, "_set_snap_step_x");
grid_settings_vb->add_margin_child(TTR("Grid Step X:"), sb_step_x);
SpinBox *sb_step_y = memnew(SpinBox);
@@ -1449,7 +1449,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
sb_step_y->set_step(1);
sb_step_y->set_value(snap_step.y);
sb_step_y->set_suffix("px");
- sb_step_y->connect("value_changed", this, "_set_snap_step_y");
+ sb_step_y->connect_compat("value_changed", this, "_set_snap_step_y");
grid_settings_vb->add_margin_child(TTR("Grid Step Y:"), sb_step_y);
uv_mode_hb->add_child(memnew(VSeparator));
@@ -1469,16 +1469,16 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
uv_zoom->share(uv_zoom_value);
uv_zoom_value->set_custom_minimum_size(Size2(50, 0));
uv_mode_hb->add_child(uv_zoom_value);
- uv_zoom->connect("value_changed", this, "_uv_scroll_changed");
+ uv_zoom->connect_compat("value_changed", this, "_uv_scroll_changed");
uv_vscroll = memnew(VScrollBar);
uv_vscroll->set_step(0.001);
uv_edit_draw->add_child(uv_vscroll);
- uv_vscroll->connect("value_changed", this, "_uv_scroll_changed");
+ uv_vscroll->connect_compat("value_changed", this, "_uv_scroll_changed");
uv_hscroll = memnew(HScrollBar);
uv_hscroll->set_step(0.001);
uv_edit_draw->add_child(uv_hscroll);
- uv_hscroll->connect("value_changed", this, "_uv_scroll_changed");
+ uv_hscroll->connect_compat("value_changed", this, "_uv_scroll_changed");
bone_scroll_main_vb = memnew(VBoxContainer);
bone_scroll_main_vb->hide();
@@ -1486,7 +1486,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
sync_bones = memnew(Button(TTR("Sync Bones to Polygon")));
bone_scroll_main_vb->add_child(sync_bones);
sync_bones->set_h_size_flags(0);
- sync_bones->connect("pressed", this, "_sync_bones");
+ sync_bones->connect_compat("pressed", this, "_sync_bones");
uv_main_hsc->add_child(bone_scroll_main_vb);
bone_scroll = memnew(ScrollContainer);
bone_scroll->set_v_scroll(true);
@@ -1496,8 +1496,8 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
bone_scroll_vb = memnew(VBoxContainer);
bone_scroll->add_child(bone_scroll_vb);
- uv_edit_draw->connect("draw", this, "_uv_draw");
- uv_edit_draw->connect("gui_input", this, "_uv_input");
+ uv_edit_draw->connect_compat("draw", this, "_uv_draw");
+ uv_edit_draw->connect_compat("gui_input", this, "_uv_input");
uv_draw_zoom = 1.0;
point_drag_index = -1;
uv_drag = false;
diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp
index fb04f50827..12b8ac9008 100644
--- a/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -382,7 +382,7 @@ ResourcePreloaderEditor::ResourcePreloaderEditor() {
add_child(file);
tree = memnew(Tree);
- tree->connect("button_pressed", this, "_cell_button_pressed");
+ tree->connect_compat("button_pressed", this, "_cell_button_pressed");
tree->set_columns(2);
tree->set_column_min_width(0, 2);
tree->set_column_min_width(1, 3);
@@ -396,10 +396,10 @@ ResourcePreloaderEditor::ResourcePreloaderEditor() {
dialog = memnew(AcceptDialog);
add_child(dialog);
- load->connect("pressed", this, "_load_pressed");
- paste->connect("pressed", this, "_paste_pressed");
- file->connect("files_selected", this, "_files_load_request");
- tree->connect("item_edited", this, "_item_edited");
+ load->connect_compat("pressed", this, "_load_pressed");
+ paste->connect_compat("pressed", this, "_paste_pressed");
+ file->connect_compat("files_selected", this, "_files_load_request");
+ tree->connect_compat("item_edited", this, "_item_edited");
loading_scene = false;
}
diff --git a/editor/plugins/root_motion_editor_plugin.cpp b/editor/plugins/root_motion_editor_plugin.cpp
index 1349de5d8e..132ec40dd2 100644
--- a/editor/plugins/root_motion_editor_plugin.cpp
+++ b/editor/plugins/root_motion_editor_plugin.cpp
@@ -262,24 +262,24 @@ EditorPropertyRootMotion::EditorPropertyRootMotion() {
assign->set_flat(true);
assign->set_h_size_flags(SIZE_EXPAND_FILL);
assign->set_clip_text(true);
- assign->connect("pressed", this, "_node_assign");
+ assign->connect_compat("pressed", this, "_node_assign");
hbc->add_child(assign);
clear = memnew(Button);
clear->set_flat(true);
- clear->connect("pressed", this, "_node_clear");
+ clear->connect_compat("pressed", this, "_node_clear");
hbc->add_child(clear);
filter_dialog = memnew(ConfirmationDialog);
add_child(filter_dialog);
filter_dialog->set_title(TTR("Edit Filtered Tracks:"));
- filter_dialog->connect("confirmed", this, "_confirmed");
+ filter_dialog->connect_compat("confirmed", this, "_confirmed");
filters = memnew(Tree);
filter_dialog->add_child(filters);
filters->set_v_size_flags(SIZE_EXPAND_FILL);
filters->set_hide_root(true);
- filters->connect("item_activated", this, "_confirmed");
+ filters->connect_compat("item_activated", this, "_confirmed");
//filters->connect("item_edited", this, "_filter_edited");
}
//////////////////////////
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index f12be18c21..cea18b63f1 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -210,7 +210,7 @@ void ScriptEditorQuickOpen::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
- connect("confirmed", this, "_confirmed");
+ connect_compat("confirmed", this, "_confirmed");
search_box->set_clear_button_enabled(true);
FALLTHROUGH;
@@ -219,7 +219,7 @@ void ScriptEditorQuickOpen::_notification(int p_what) {
search_box->set_right_icon(get_icon("Search", "EditorIcons"));
} break;
case NOTIFICATION_EXIT_TREE: {
- disconnect("confirmed", this, "_confirmed");
+ disconnect_compat("confirmed", this, "_confirmed");
} break;
}
}
@@ -239,15 +239,15 @@ ScriptEditorQuickOpen::ScriptEditorQuickOpen() {
add_child(vbc);
search_box = memnew(LineEdit);
vbc->add_margin_child(TTR("Search:"), search_box);
- search_box->connect("text_changed", this, "_text_changed");
- search_box->connect("gui_input", this, "_sbox_input");
+ search_box->connect_compat("text_changed", this, "_text_changed");
+ search_box->connect_compat("gui_input", this, "_sbox_input");
search_options = memnew(Tree);
vbc->add_margin_child(TTR("Matches:"), search_options, true);
get_ok()->set_text(TTR("Open"));
get_ok()->set_disabled(true);
register_text_enter(search_box);
set_hide_on_ok(false);
- search_options->connect("item_activated", this, "_confirmed");
+ search_options->connect_compat("item_activated", this, "_confirmed");
search_options->set_hide_root(true);
search_options->set_hide_folding(true);
search_options->add_constant_override("draw_guides", 1);
@@ -1439,18 +1439,18 @@ void ScriptEditor::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
- editor->connect("play_pressed", this, "_editor_play");
- editor->connect("pause_pressed", this, "_editor_pause");
- editor->connect("stop_pressed", this, "_editor_stop");
- editor->connect("script_add_function_request", this, "_add_callback");
- editor->connect("resource_saved", this, "_res_saved_callback");
- script_list->connect("item_selected", this, "_script_selected");
+ editor->connect_compat("play_pressed", this, "_editor_play");
+ editor->connect_compat("pause_pressed", this, "_editor_pause");
+ editor->connect_compat("stop_pressed", this, "_editor_stop");
+ editor->connect_compat("script_add_function_request", this, "_add_callback");
+ editor->connect_compat("resource_saved", this, "_res_saved_callback");
+ script_list->connect_compat("item_selected", this, "_script_selected");
- members_overview->connect("item_selected", this, "_members_overview_selected");
- help_overview->connect("item_selected", this, "_help_overview_selected");
- script_split->connect("dragged", this, "_script_split_dragged");
+ members_overview->connect_compat("item_selected", this, "_members_overview_selected");
+ help_overview->connect_compat("item_selected", this, "_help_overview_selected");
+ script_split->connect_compat("dragged", this, "_script_split_dragged");
- EditorSettings::get_singleton()->connect("settings_changed", this, "_editor_settings_changed");
+ EditorSettings::get_singleton()->connect_compat("settings_changed", this, "_editor_settings_changed");
FALLTHROUGH;
}
case NOTIFICATION_THEME_CHANGED: {
@@ -1474,16 +1474,16 @@ void ScriptEditor::_notification(int p_what) {
case NOTIFICATION_READY: {
- get_tree()->connect("tree_changed", this, "_tree_changed");
- editor->get_inspector_dock()->connect("request_help", this, "_request_help");
- editor->connect("request_help_search", this, "_help_search");
+ get_tree()->connect_compat("tree_changed", this, "_tree_changed");
+ editor->get_inspector_dock()->connect_compat("request_help", this, "_request_help");
+ editor->connect_compat("request_help_search", this, "_help_search");
} break;
case NOTIFICATION_EXIT_TREE: {
- editor->disconnect("play_pressed", this, "_editor_play");
- editor->disconnect("pause_pressed", this, "_editor_pause");
- editor->disconnect("stop_pressed", this, "_editor_stop");
+ editor->disconnect_compat("play_pressed", this, "_editor_play");
+ editor->disconnect_compat("pause_pressed", this, "_editor_pause");
+ editor->disconnect_compat("stop_pressed", this, "_editor_stop");
} break;
case MainLoop::NOTIFICATION_WM_FOCUS_IN: {
@@ -2194,14 +2194,14 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra
_sort_list_on_update = true;
_update_script_names();
_save_layout();
- se->connect("name_changed", this, "_update_script_names");
- se->connect("edited_script_changed", this, "_script_changed");
- se->connect("request_help", this, "_help_search");
- se->connect("request_open_script_at_line", this, "_goto_script_line");
- se->connect("go_to_help", this, "_help_class_goto");
- se->connect("request_save_history", this, "_save_history");
- se->connect("search_in_files_requested", this, "_on_find_in_files_requested");
- se->connect("replace_in_files_requested", this, "_on_replace_in_files_requested");
+ se->connect_compat("name_changed", this, "_update_script_names");
+ se->connect_compat("edited_script_changed", this, "_script_changed");
+ se->connect_compat("request_help", this, "_help_search");
+ se->connect_compat("request_open_script_at_line", this, "_goto_script_line");
+ se->connect_compat("go_to_help", this, "_help_class_goto");
+ se->connect_compat("request_save_history", this, "_save_history");
+ se->connect_compat("search_in_files_requested", this, "_on_find_in_files_requested");
+ se->connect_compat("replace_in_files_requested", this, "_on_replace_in_files_requested");
//test for modification, maybe the script was not edited but was loaded
@@ -2813,7 +2813,7 @@ void ScriptEditor::_help_class_open(const String &p_class) {
tab_container->add_child(eh);
_go_to_tab(tab_container->get_tab_count() - 1);
eh->go_to_class(p_class, 0);
- eh->connect("go_to_help", this, "_help_class_goto");
+ eh->connect_compat("go_to_help", this, "_help_class_goto");
_add_recent_script(p_class);
_sort_list_on_update = true;
_update_script_names();
@@ -2843,7 +2843,7 @@ void ScriptEditor::_help_class_goto(const String &p_desc) {
tab_container->add_child(eh);
_go_to_tab(tab_container->get_tab_count() - 1);
eh->go_to_help(p_desc);
- eh->connect("go_to_help", this, "_help_class_goto");
+ eh->connect_compat("go_to_help", this, "_help_class_goto");
_add_recent_script(eh->get_class());
_sort_list_on_update = true;
_update_script_names();
@@ -3221,7 +3221,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
filter_scripts = memnew(LineEdit);
filter_scripts->set_placeholder(TTR("Filter scripts"));
filter_scripts->set_clear_button_enabled(true);
- filter_scripts->connect("text_changed", this, "_filter_scripts_text_changed");
+ filter_scripts->connect_compat("text_changed", this, "_filter_scripts_text_changed");
scripts_vbox->add_child(filter_scripts);
script_list = memnew(ItemList);
@@ -3230,13 +3230,13 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
script_list->set_v_size_flags(SIZE_EXPAND_FILL);
script_split->set_split_offset(140);
_sort_list_on_update = true;
- script_list->connect("gui_input", this, "_script_list_gui_input", varray(), CONNECT_DEFERRED);
+ script_list->connect_compat("gui_input", this, "_script_list_gui_input", varray(), CONNECT_DEFERRED);
script_list->set_allow_rmb_select(true);
script_list->set_drag_forwarding(this);
context_menu = memnew(PopupMenu);
add_child(context_menu);
- context_menu->connect("id_pressed", this, "_menu_option");
+ context_menu->connect_compat("id_pressed", this, "_menu_option");
context_menu->set_hide_on_window_lose_focus(true);
overview_vbox = memnew(VBoxContainer);
@@ -3257,14 +3257,14 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
members_overview_alphabeta_sort_button->set_tooltip(TTR("Toggle alphabetical sorting of the method list."));
members_overview_alphabeta_sort_button->set_toggle_mode(true);
members_overview_alphabeta_sort_button->set_pressed(EditorSettings::get_singleton()->get("text_editor/tools/sort_members_outline_alphabetically"));
- members_overview_alphabeta_sort_button->connect("toggled", this, "_toggle_members_overview_alpha_sort");
+ members_overview_alphabeta_sort_button->connect_compat("toggled", this, "_toggle_members_overview_alpha_sort");
buttons_hbox->add_child(members_overview_alphabeta_sort_button);
filter_methods = memnew(LineEdit);
filter_methods->set_placeholder(TTR("Filter methods"));
filter_methods->set_clear_button_enabled(true);
- filter_methods->connect("text_changed", this, "_filter_methods_text_changed");
+ filter_methods->connect_compat("text_changed", this, "_filter_methods_text_changed");
overview_vbox->add_child(filter_methods);
members_overview = memnew(ItemList);
@@ -3308,7 +3308,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
recent_scripts = memnew(PopupMenu);
recent_scripts->set_name("RecentScripts");
file_menu->get_popup()->add_child(recent_scripts);
- recent_scripts->connect("id_pressed", this, "_open_recent_script");
+ recent_scripts->connect_compat("id_pressed", this, "_open_recent_script");
_update_recent_scripts();
file_menu->get_popup()->add_separator();
@@ -3330,7 +3330,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
theme_submenu = memnew(PopupMenu);
theme_submenu->set_name("Theme");
file_menu->get_popup()->add_child(theme_submenu);
- theme_submenu->connect("id_pressed", this, "_theme_option");
+ theme_submenu->connect_compat("id_pressed", this, "_theme_option");
theme_submenu->add_shortcut(ED_SHORTCUT("script_editor/import_theme", TTR("Import Theme...")), THEME_IMPORT);
theme_submenu->add_shortcut(ED_SHORTCUT("script_editor/reload_theme", TTR("Reload Theme")), THEME_RELOAD);
@@ -3349,14 +3349,14 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
file_menu->get_popup()->add_separator();
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/toggle_scripts_panel", TTR("Toggle Scripts Panel"), KEY_MASK_CMD | KEY_BACKSLASH), TOGGLE_SCRIPTS_PANEL);
- file_menu->get_popup()->connect("id_pressed", this, "_menu_option");
+ file_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option");
script_search_menu = memnew(MenuButton);
menu_hb->add_child(script_search_menu);
script_search_menu->set_text(TTR("Search"));
script_search_menu->set_switch_on_hover(true);
script_search_menu->get_popup()->set_hide_on_window_lose_focus(true);
- script_search_menu->get_popup()->connect("id_pressed", this, "_menu_option");
+ script_search_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option");
debug_menu = memnew(MenuButton);
menu_hb->add_child(debug_menu);
@@ -3372,7 +3372,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
//debug_menu->get_popup()->add_check_item("Show Debugger",DEBUG_SHOW);
debug_menu->get_popup()->add_check_shortcut(ED_SHORTCUT("debugger/keep_debugger_open", TTR("Keep Debugger Open")), DEBUG_SHOW_KEEP_OPEN);
debug_menu->get_popup()->add_check_shortcut(ED_SHORTCUT("debugger/debug_with_external_editor", TTR("Debug with External Editor")), DEBUG_WITH_EXTERNAL_EDITOR);
- debug_menu->get_popup()->connect("id_pressed", this, "_menu_option");
+ debug_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option");
debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_NEXT), true);
debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_STEP), true);
@@ -3393,63 +3393,63 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
site_search = memnew(ToolButton);
site_search->set_text(TTR("Online Docs"));
- site_search->connect("pressed", this, "_menu_option", varray(SEARCH_WEBSITE));
+ site_search->connect_compat("pressed", this, "_menu_option", varray(SEARCH_WEBSITE));
menu_hb->add_child(site_search);
site_search->set_tooltip(TTR("Open Godot online documentation."));
request_docs = memnew(ToolButton);
request_docs->set_text(TTR("Request Docs"));
- request_docs->connect("pressed", this, "_menu_option", varray(REQUEST_DOCS));
+ request_docs->connect_compat("pressed", this, "_menu_option", varray(REQUEST_DOCS));
menu_hb->add_child(request_docs);
request_docs->set_tooltip(TTR("Help improve the Godot documentation by giving feedback."));
help_search = memnew(ToolButton);
help_search->set_text(TTR("Search Help"));
- help_search->connect("pressed", this, "_menu_option", varray(SEARCH_HELP));
+ help_search->connect_compat("pressed", this, "_menu_option", varray(SEARCH_HELP));
menu_hb->add_child(help_search);
help_search->set_tooltip(TTR("Search the reference documentation."));
menu_hb->add_child(memnew(VSeparator));
script_back = memnew(ToolButton);
- script_back->connect("pressed", this, "_history_back");
+ script_back->connect_compat("pressed", this, "_history_back");
menu_hb->add_child(script_back);
script_back->set_disabled(true);
script_back->set_tooltip(TTR("Go to previous edited document."));
script_forward = memnew(ToolButton);
- script_forward->connect("pressed", this, "_history_forward");
+ script_forward->connect_compat("pressed", this, "_history_forward");
menu_hb->add_child(script_forward);
script_forward->set_disabled(true);
script_forward->set_tooltip(TTR("Go to next edited document."));
- tab_container->connect("tab_changed", this, "_tab_changed");
+ tab_container->connect_compat("tab_changed", this, "_tab_changed");
erase_tab_confirm = memnew(ConfirmationDialog);
erase_tab_confirm->get_ok()->set_text(TTR("Save"));
erase_tab_confirm->add_button(TTR("Discard"), OS::get_singleton()->get_swap_ok_cancel(), "discard");
- erase_tab_confirm->connect("confirmed", this, "_close_current_tab");
- erase_tab_confirm->connect("custom_action", this, "_close_discard_current_tab");
+ erase_tab_confirm->connect_compat("confirmed", this, "_close_current_tab");
+ erase_tab_confirm->connect_compat("custom_action", this, "_close_discard_current_tab");
add_child(erase_tab_confirm);
script_create_dialog = memnew(ScriptCreateDialog);
script_create_dialog->set_title(TTR("Create Script"));
add_child(script_create_dialog);
- script_create_dialog->connect("script_created", this, "_script_created");
+ script_create_dialog->connect_compat("script_created", this, "_script_created");
file_dialog_option = -1;
file_dialog = memnew(EditorFileDialog);
add_child(file_dialog);
- file_dialog->connect("file_selected", this, "_file_dialog_action");
+ file_dialog->connect_compat("file_selected", this, "_file_dialog_action");
error_dialog = memnew(AcceptDialog);
add_child(error_dialog);
debugger = memnew(ScriptEditorDebugger(editor));
- debugger->connect("goto_script_line", this, "_goto_script_line");
- debugger->connect("set_execution", this, "_set_execution");
- debugger->connect("clear_execution", this, "_clear_execution");
- debugger->connect("show_debugger", this, "_show_debugger");
+ debugger->connect_compat("goto_script_line", this, "_goto_script_line");
+ debugger->connect_compat("set_execution", this, "_set_execution");
+ debugger->connect_compat("clear_execution", this, "_clear_execution");
+ debugger->connect_compat("show_debugger", this, "_show_debugger");
disk_changed = memnew(ConfirmationDialog);
{
@@ -3464,11 +3464,11 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
vbc->add_child(disk_changed_list);
disk_changed_list->set_v_size_flags(SIZE_EXPAND_FILL);
- disk_changed->connect("confirmed", this, "_reload_scripts");
+ disk_changed->connect_compat("confirmed", this, "_reload_scripts");
disk_changed->get_ok()->set_text(TTR("Reload"));
disk_changed->add_button(TTR("Resave"), !OS::get_singleton()->get_swap_ok_cancel(), "resave");
- disk_changed->connect("custom_action", this, "_resave_scripts");
+ disk_changed->connect_compat("custom_action", this, "_resave_scripts");
}
add_child(disk_changed);
@@ -3478,29 +3478,29 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
Button *db = EditorNode::get_singleton()->add_bottom_panel_item(TTR("Debugger"), debugger);
debugger->set_tool_button(db);
- debugger->connect("breaked", this, "_breaked");
+ debugger->connect_compat("breaked", this, "_breaked");
autosave_timer = memnew(Timer);
autosave_timer->set_one_shot(false);
- autosave_timer->connect(SceneStringNames::get_singleton()->tree_entered, this, "_update_autosave_timer");
- autosave_timer->connect("timeout", this, "_autosave_scripts");
+ autosave_timer->connect_compat(SceneStringNames::get_singleton()->tree_entered, this, "_update_autosave_timer");
+ autosave_timer->connect_compat("timeout", this, "_autosave_scripts");
add_child(autosave_timer);
grab_focus_block = false;
help_search_dialog = memnew(EditorHelpSearch);
add_child(help_search_dialog);
- help_search_dialog->connect("go_to_help", this, "_help_class_goto");
+ help_search_dialog->connect_compat("go_to_help", this, "_help_class_goto");
find_in_files_dialog = memnew(FindInFilesDialog);
- find_in_files_dialog->connect(FindInFilesDialog::SIGNAL_FIND_REQUESTED, this, "_start_find_in_files", varray(false));
- find_in_files_dialog->connect(FindInFilesDialog::SIGNAL_REPLACE_REQUESTED, this, "_start_find_in_files", varray(true));
+ find_in_files_dialog->connect_compat(FindInFilesDialog::SIGNAL_FIND_REQUESTED, this, "_start_find_in_files", varray(false));
+ find_in_files_dialog->connect_compat(FindInFilesDialog::SIGNAL_REPLACE_REQUESTED, this, "_start_find_in_files", varray(true));
add_child(find_in_files_dialog);
find_in_files = memnew(FindInFilesPanel);
find_in_files_button = editor->add_bottom_panel_item(TTR("Search Results"), find_in_files);
find_in_files->set_custom_minimum_size(Size2(0, 200) * EDSCALE);
- find_in_files->connect(FindInFilesPanel::SIGNAL_RESULT_SELECTED, this, "_on_find_in_files_result_selected");
- find_in_files->connect(FindInFilesPanel::SIGNAL_FILES_MODIFIED, this, "_on_find_in_files_modified_files");
+ find_in_files->connect_compat(FindInFilesPanel::SIGNAL_RESULT_SELECTED, this, "_on_find_in_files_result_selected");
+ find_in_files->connect_compat(FindInFilesPanel::SIGNAL_FILES_MODIFIED, this, "_on_find_in_files_modified_files");
find_in_files->hide();
find_in_files_button->hide();
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 9f1e2f0353..2069c035fb 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -53,24 +53,24 @@ void ConnectionInfoDialog::popup_connections(String p_method, Vector<Node *> p_n
for (List<Connection>::Element *E = all_connections.front(); E; E = E->next()) {
Connection connection = E->get();
- if (connection.method != p_method) {
+ if (connection.callable.get_method() != p_method) {
continue;
}
TreeItem *node_item = tree->create_item(root);
- node_item->set_text(0, Object::cast_to<Node>(connection.source)->get_name());
- node_item->set_icon(0, EditorNode::get_singleton()->get_object_icon(connection.source, "Node"));
+ node_item->set_text(0, Object::cast_to<Node>(connection.signal.get_object())->get_name());
+ node_item->set_icon(0, EditorNode::get_singleton()->get_object_icon(connection.signal.get_object(), "Node"));
node_item->set_selectable(0, false);
node_item->set_editable(0, false);
- node_item->set_text(1, connection.signal);
+ node_item->set_text(1, connection.signal.get_name());
node_item->set_icon(1, get_parent_control()->get_icon("Slot", "EditorIcons"));
node_item->set_selectable(1, false);
node_item->set_editable(1, false);
- node_item->set_text(2, Object::cast_to<Node>(connection.target)->get_name());
- node_item->set_icon(2, EditorNode::get_singleton()->get_object_icon(connection.target, "Node"));
+ node_item->set_text(2, Object::cast_to<Node>(connection.callable.get_object())->get_name());
+ node_item->set_icon(2, EditorNode::get_singleton()->get_object_icon(connection.callable.get_object(), "Node"));
node_item->set_selectable(2, false);
node_item->set_editable(2, false);
}
@@ -603,12 +603,12 @@ void ScriptTextEditor::_validate_script() {
Connection connection = E->get();
String base_path = base->get_name();
- String source_path = base == connection.source ? base_path : base_path + "/" + base->get_path_to(Object::cast_to<Node>(connection.source));
- String target_path = base == connection.target ? base_path : base_path + "/" + base->get_path_to(Object::cast_to<Node>(connection.target));
+ String source_path = base == connection.signal.get_object() ? base_path : base_path + "/" + base->get_path_to(Object::cast_to<Node>(connection.signal.get_object()));
+ String target_path = base == connection.callable.get_object() ? base_path : base_path + "/" + base->get_path_to(Object::cast_to<Node>(connection.callable.get_object()));
warnings_panel->push_cell();
warnings_panel->push_color(warnings_panel->get_color("warning_color", "Editor"));
- warnings_panel->add_text(vformat(TTR("Missing connected method '%s' for signal '%s' from node '%s' to node '%s'."), connection.method, connection.signal, source_path, target_path));
+ warnings_panel->add_text(vformat(TTR("Missing connected method '%s' for signal '%s' from node '%s' to node '%s'."), connection.callable.get_method(), connection.signal.get_name(), source_path, target_path));
warnings_panel->pop(); // Color.
warnings_panel->pop(); // Cell.
}
@@ -1006,24 +1006,24 @@ void ScriptTextEditor::_update_connected_methods() {
}
// As deleted nodes are still accessible via the undo/redo system, check if they're still on the tree.
- Node *source = Object::cast_to<Node>(connection.source);
+ Node *source = Object::cast_to<Node>(connection.signal.get_object());
if (source && !source->is_inside_tree()) {
continue;
}
- if (methods_found.has(connection.method)) {
+ if (methods_found.has(connection.callable.get_method())) {
continue;
}
- if (!ClassDB::has_method(script->get_instance_base_type(), connection.method)) {
+ if (!ClassDB::has_method(script->get_instance_base_type(), connection.callable.get_method())) {
int line = -1;
for (int j = 0; j < functions.size(); j++) {
String name = functions[j].get_slice(":", 0);
- if (name == connection.method) {
+ if (name == connection.callable.get_method()) {
line = functions[j].get_slice(":", 1).to_int();
- text_edit->set_line_info_icon(line - 1, get_parent_control()->get_icon("Slot", "EditorIcons"), connection.method);
- methods_found.insert(connection.method);
+ text_edit->set_line_info_icon(line - 1, get_parent_control()->get_icon("Slot", "EditorIcons"), connection.callable.get_method());
+ methods_found.insert(connection.callable.get_method());
break;
}
}
@@ -1036,7 +1036,7 @@ void ScriptTextEditor::_update_connected_methods() {
bool found_inherited_function = false;
Ref<Script> inherited_script = script->get_base_script();
while (!inherited_script.is_null()) {
- if (inherited_script->has_method(connection.method)) {
+ if (inherited_script->has_method(connection.callable.get_method())) {
found_inherited_function = true;
break;
}
@@ -1774,12 +1774,12 @@ ScriptTextEditor::ScriptTextEditor() {
editor_box->add_child(code_editor);
code_editor->add_constant_override("separation", 2);
code_editor->set_anchors_and_margins_preset(Control::PRESET_WIDE);
- code_editor->connect("validate_script", this, "_validate_script");
- code_editor->connect("load_theme_settings", this, "_load_theme_settings");
+ code_editor->connect_compat("validate_script", this, "_validate_script");
+ code_editor->connect_compat("load_theme_settings", this, "_load_theme_settings");
code_editor->set_code_complete_func(_code_complete_scripts, this);
- code_editor->get_text_edit()->connect("breakpoint_toggled", this, "_breakpoint_toggled");
- code_editor->get_text_edit()->connect("symbol_lookup", this, "_lookup_symbol");
- code_editor->get_text_edit()->connect("info_clicked", this, "_lookup_connections");
+ code_editor->get_text_edit()->connect_compat("breakpoint_toggled", this, "_breakpoint_toggled");
+ code_editor->get_text_edit()->connect_compat("symbol_lookup", this, "_lookup_symbol");
+ code_editor->get_text_edit()->connect_compat("info_clicked", this, "_lookup_connections");
code_editor->set_v_size_flags(SIZE_EXPAND_FILL);
code_editor->show_toggle_scripts_button();
@@ -1792,9 +1792,9 @@ ScriptTextEditor::ScriptTextEditor() {
warnings_panel->set_focus_mode(FOCUS_CLICK);
warnings_panel->hide();
- code_editor->connect("error_pressed", this, "_error_pressed");
- code_editor->connect("show_warnings_panel", this, "_show_warnings_panel");
- warnings_panel->connect("meta_clicked", this, "_warning_clicked");
+ code_editor->connect_compat("error_pressed", this, "_error_pressed");
+ code_editor->connect_compat("show_warnings_panel", this, "_show_warnings_panel");
+ warnings_panel->connect_compat("meta_clicked", this, "_warning_clicked");
update_settings();
@@ -1804,11 +1804,11 @@ ScriptTextEditor::ScriptTextEditor() {
code_editor->get_text_edit()->set_select_identifiers_on_hover(true);
code_editor->get_text_edit()->set_context_menu_enabled(false);
- code_editor->get_text_edit()->connect("gui_input", this, "_text_edit_gui_input");
+ code_editor->get_text_edit()->connect_compat("gui_input", this, "_text_edit_gui_input");
context_menu = memnew(PopupMenu);
add_child(context_menu);
- context_menu->connect("id_pressed", this, "_edit_option");
+ context_menu->connect_compat("id_pressed", this, "_edit_option");
context_menu->set_hide_on_window_lose_focus(true);
color_panel = memnew(PopupPanel);
@@ -1816,7 +1816,7 @@ ScriptTextEditor::ScriptTextEditor() {
color_picker = memnew(ColorPicker);
color_picker->set_deferred_mode(true);
color_panel->add_child(color_picker);
- color_picker->connect("color_changed", this, "_color_changed");
+ color_picker->connect_compat("color_changed", this, "_color_changed");
// get default color picker mode from editor settings
int default_color_mode = EDITOR_GET("interface/inspector/default_color_picker_mode");
@@ -1857,7 +1857,7 @@ ScriptTextEditor::ScriptTextEditor() {
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_spaces"), EDIT_CONVERT_INDENT_TO_SPACES);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_tabs"), EDIT_CONVERT_INDENT_TO_TABS);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/auto_indent"), EDIT_AUTO_INDENT);
- edit_menu->get_popup()->connect("id_pressed", this, "_edit_option");
+ edit_menu->get_popup()->connect_compat("id_pressed", this, "_edit_option");
edit_menu->get_popup()->add_separator();
PopupMenu *convert_case = memnew(PopupMenu);
@@ -1867,7 +1867,7 @@ ScriptTextEditor::ScriptTextEditor() {
convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_uppercase", TTR("Uppercase"), KEY_MASK_SHIFT | KEY_F4), EDIT_TO_UPPERCASE);
convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_lowercase", TTR("Lowercase"), KEY_MASK_SHIFT | KEY_F5), EDIT_TO_LOWERCASE);
convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/capitalize", TTR("Capitalize"), KEY_MASK_SHIFT | KEY_F6), EDIT_CAPITALIZE);
- convert_case->connect("id_pressed", this, "_edit_option");
+ convert_case->connect_compat("id_pressed", this, "_edit_option");
highlighters[TTR("Standard")] = NULL;
highlighter_menu = memnew(PopupMenu);
@@ -1875,7 +1875,7 @@ ScriptTextEditor::ScriptTextEditor() {
edit_menu->get_popup()->add_child(highlighter_menu);
edit_menu->get_popup()->add_submenu_item(TTR("Syntax Highlighter"), "highlighter_menu");
highlighter_menu->add_radio_check_item(TTR("Standard"));
- highlighter_menu->connect("id_pressed", this, "_change_syntax_highlighter");
+ highlighter_menu->connect_compat("id_pressed", this, "_change_syntax_highlighter");
search_menu = memnew(MenuButton);
edit_hb->add_child(search_menu);
@@ -1891,7 +1891,7 @@ ScriptTextEditor::ScriptTextEditor() {
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace_in_files"), REPLACE_IN_FILES);
search_menu->get_popup()->add_separator();
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/contextual_help"), HELP_CONTEXTUAL);
- search_menu->get_popup()->connect("id_pressed", this, "_edit_option");
+ search_menu->get_popup()->connect_compat("id_pressed", this, "_edit_option");
edit_hb->add_child(edit_menu);
@@ -1899,7 +1899,7 @@ ScriptTextEditor::ScriptTextEditor() {
edit_hb->add_child(goto_menu);
goto_menu->set_text(TTR("Go To"));
goto_menu->set_switch_on_hover(true);
- goto_menu->get_popup()->connect("id_pressed", this, "_edit_option");
+ goto_menu->get_popup()->connect_compat("id_pressed", this, "_edit_option");
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_function"), SEARCH_LOCATE_FUNCTION);
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE);
@@ -1910,20 +1910,20 @@ ScriptTextEditor::ScriptTextEditor() {
goto_menu->get_popup()->add_child(bookmarks_menu);
goto_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "Bookmarks");
_update_bookmark_list();
- bookmarks_menu->connect("about_to_show", this, "_update_bookmark_list");
- bookmarks_menu->connect("index_pressed", this, "_bookmark_item_pressed");
+ bookmarks_menu->connect_compat("about_to_show", this, "_update_bookmark_list");
+ bookmarks_menu->connect_compat("index_pressed", this, "_bookmark_item_pressed");
breakpoints_menu = memnew(PopupMenu);
breakpoints_menu->set_name("Breakpoints");
goto_menu->get_popup()->add_child(breakpoints_menu);
goto_menu->get_popup()->add_submenu_item(TTR("Breakpoints"), "Breakpoints");
_update_breakpoint_list();
- breakpoints_menu->connect("about_to_show", this, "_update_breakpoint_list");
- breakpoints_menu->connect("index_pressed", this, "_breakpoint_item_pressed");
+ breakpoints_menu->connect_compat("about_to_show", this, "_update_breakpoint_list");
+ breakpoints_menu->connect_compat("index_pressed", this, "_breakpoint_item_pressed");
quick_open = memnew(ScriptEditorQuickOpen);
add_child(quick_open);
- quick_open->connect("goto_line", this, "_goto_line");
+ quick_open->connect_compat("goto_line", this, "_goto_line");
goto_line_dialog = memnew(GotoLineDialog);
add_child(goto_line_dialog);
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index a19f0b4975..6c20483cf6 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -607,8 +607,8 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) {
shader_editor->add_constant_override("separation", 0);
shader_editor->set_anchors_and_margins_preset(Control::PRESET_WIDE);
- shader_editor->connect("script_changed", this, "apply_shaders");
- EditorSettings::get_singleton()->connect("settings_changed", this, "_editor_settings_changed");
+ shader_editor->connect_compat("script_changed", this, "apply_shaders");
+ EditorSettings::get_singleton()->connect_compat("settings_changed", this, "_editor_settings_changed");
shader_editor->get_text_edit()->set_callhint_settings(
EditorSettings::get_singleton()->get("text_editor/completion/put_callhint_tooltip_below_current_line"),
@@ -616,13 +616,13 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) {
shader_editor->get_text_edit()->set_select_identifiers_on_hover(true);
shader_editor->get_text_edit()->set_context_menu_enabled(false);
- shader_editor->get_text_edit()->connect("gui_input", this, "_text_edit_gui_input");
+ shader_editor->get_text_edit()->connect_compat("gui_input", this, "_text_edit_gui_input");
shader_editor->update_editor_settings();
context_menu = memnew(PopupMenu);
add_child(context_menu);
- context_menu->connect("id_pressed", this, "_menu_option");
+ context_menu->connect_compat("id_pressed", this, "_menu_option");
context_menu->set_hide_on_window_lose_focus(true);
VBoxContainer *main_container = memnew(VBoxContainer);
@@ -650,7 +650,7 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) {
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/clone_down"), EDIT_CLONE_DOWN);
edit_menu->get_popup()->add_separator();
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/complete_symbol"), EDIT_COMPLETE);
- edit_menu->get_popup()->connect("id_pressed", this, "_menu_option");
+ edit_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option");
search_menu = memnew(MenuButton);
search_menu->set_text(TTR("Search"));
@@ -660,12 +660,12 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) {
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_next"), SEARCH_FIND_NEXT);
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_previous"), SEARCH_FIND_PREV);
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace"), SEARCH_REPLACE);
- search_menu->get_popup()->connect("id_pressed", this, "_menu_option");
+ search_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option");
MenuButton *goto_menu = memnew(MenuButton);
goto_menu->set_text(TTR("Go To"));
goto_menu->set_switch_on_hover(true);
- goto_menu->get_popup()->connect("id_pressed", this, "_menu_option");
+ goto_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option");
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE);
goto_menu->get_popup()->add_separator();
@@ -675,14 +675,14 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) {
goto_menu->get_popup()->add_child(bookmarks_menu);
goto_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "Bookmarks");
_update_bookmark_list();
- bookmarks_menu->connect("about_to_show", this, "_update_bookmark_list");
- bookmarks_menu->connect("index_pressed", this, "_bookmark_item_pressed");
+ bookmarks_menu->connect_compat("about_to_show", this, "_update_bookmark_list");
+ bookmarks_menu->connect_compat("index_pressed", this, "_bookmark_item_pressed");
help_menu = memnew(MenuButton);
help_menu->set_text(TTR("Help"));
help_menu->set_switch_on_hover(true);
help_menu->get_popup()->add_icon_item(p_node->get_gui_base()->get_icon("Instance", "EditorIcons"), TTR("Online Docs"), HELP_DOCS);
- help_menu->get_popup()->connect("id_pressed", this, "_menu_option");
+ help_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option");
add_child(main_container);
main_container->add_child(hbc);
@@ -705,11 +705,11 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) {
dl->set_text(TTR("This shader has been modified on on disk.\nWhat action should be taken?"));
vbc->add_child(dl);
- disk_changed->connect("confirmed", this, "_reload_shader_from_disk");
+ disk_changed->connect_compat("confirmed", this, "_reload_shader_from_disk");
disk_changed->get_ok()->set_text(TTR("Reload"));
disk_changed->add_button(TTR("Resave"), !OS::get_singleton()->get_swap_ok_cancel(), "resave");
- disk_changed->connect("custom_action", this, "save_external_data");
+ disk_changed->connect_compat("custom_action", this, "save_external_data");
add_child(disk_changed);
diff --git a/editor/plugins/skeleton_2d_editor_plugin.cpp b/editor/plugins/skeleton_2d_editor_plugin.cpp
index dbe64f202d..d83a8ddf2d 100644
--- a/editor/plugins/skeleton_2d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_2d_editor_plugin.cpp
@@ -110,7 +110,7 @@ Skeleton2DEditor::Skeleton2DEditor() {
options->get_popup()->add_item(TTR("Set Bones to Rest Pose"), MENU_OPTION_SET_REST);
options->set_switch_on_hover(true);
- options->get_popup()->connect("id_pressed", this, "_menu_option");
+ options->get_popup()->connect_compat("id_pressed", this, "_menu_option");
err_dialog = memnew(AcceptDialog);
add_child(err_dialog);
diff --git a/editor/plugins/skeleton_editor_plugin.cpp b/editor/plugins/skeleton_editor_plugin.cpp
index 9101c64eab..43ba99317e 100644
--- a/editor/plugins/skeleton_editor_plugin.cpp
+++ b/editor/plugins/skeleton_editor_plugin.cpp
@@ -137,7 +137,7 @@ void SkeletonEditor::edit(Skeleton *p_node) {
void SkeletonEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- get_tree()->connect("node_removed", this, "_node_removed");
+ get_tree()->connect_compat("node_removed", this, "_node_removed");
}
}
@@ -164,7 +164,7 @@ SkeletonEditor::SkeletonEditor() {
options->get_popup()->add_item(TTR("Create physical skeleton"), MENU_OPTION_CREATE_PHYSICAL_SKELETON);
- options->get_popup()->connect("id_pressed", this, "_on_click_option");
+ options->get_popup()->connect_compat("id_pressed", this, "_on_click_option");
options->hide();
}
diff --git a/editor/plugins/skeleton_ik_editor_plugin.cpp b/editor/plugins/skeleton_ik_editor_plugin.cpp
index eb6ad9498d..a09dcca279 100644
--- a/editor/plugins/skeleton_ik_editor_plugin.cpp
+++ b/editor/plugins/skeleton_ik_editor_plugin.cpp
@@ -93,7 +93,7 @@ SkeletonIKEditorPlugin::SkeletonIKEditorPlugin(EditorNode *p_node) {
play_btn->set_text(TTR("Play IK"));
play_btn->set_toggle_mode(true);
play_btn->hide();
- play_btn->connect("pressed", this, "_play");
+ play_btn->connect_compat("pressed", this, "_play");
add_control_to_container(CONTAINER_SPATIAL_EDITOR_MENU, play_btn);
skeleton_ik = NULL;
}
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index b890bc2fb8..45f2a5063c 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -2187,10 +2187,10 @@ void SpatialEditorViewport::_notification(int p_what) {
if (cam != NULL && cam != previewing) {
//then switch the viewport's camera to the scene's viewport camera
if (previewing != NULL) {
- previewing->disconnect("tree_exited", this, "_preview_exited_scene");
+ previewing->disconnect_compat("tree_exited", this, "_preview_exited_scene");
}
previewing = cam;
- previewing->connect("tree_exited", this, "_preview_exited_scene");
+ previewing->connect_compat("tree_exited", this, "_preview_exited_scene");
VS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), cam->get_camera());
surface->update();
}
@@ -2331,12 +2331,12 @@ void SpatialEditorViewport::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- surface->connect("draw", this, "_draw");
- surface->connect("gui_input", this, "_sinput");
- surface->connect("mouse_entered", this, "_surface_mouse_enter");
- surface->connect("mouse_exited", this, "_surface_mouse_exit");
- surface->connect("focus_entered", this, "_surface_focus_enter");
- surface->connect("focus_exited", this, "_surface_focus_exit");
+ surface->connect_compat("draw", this, "_draw");
+ surface->connect_compat("gui_input", this, "_sinput");
+ surface->connect_compat("mouse_entered", this, "_surface_mouse_enter");
+ surface->connect_compat("mouse_exited", this, "_surface_mouse_exit");
+ surface->connect_compat("focus_entered", this, "_surface_focus_enter");
+ surface->connect_compat("focus_exited", this, "_surface_focus_exit");
_init_gizmo_instance(index);
}
@@ -2837,10 +2837,10 @@ void SpatialEditorViewport::_menu_option(int p_option) {
void SpatialEditorViewport::_preview_exited_scene() {
- preview_camera->disconnect("toggled", this, "_toggle_camera_preview");
+ preview_camera->disconnect_compat("toggled", this, "_toggle_camera_preview");
preview_camera->set_pressed(false);
_toggle_camera_preview(false);
- preview_camera->connect("toggled", this, "_toggle_camera_preview");
+ preview_camera->connect_compat("toggled", this, "_toggle_camera_preview");
view_menu->show();
}
@@ -2903,7 +2903,7 @@ void SpatialEditorViewport::_toggle_camera_preview(bool p_activate) {
if (!p_activate) {
- previewing->disconnect("tree_exiting", this, "_preview_exited_scene");
+ previewing->disconnect_compat("tree_exiting", this, "_preview_exited_scene");
previewing = NULL;
VS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), camera->get_camera()); //restore
if (!preview)
@@ -2914,7 +2914,7 @@ void SpatialEditorViewport::_toggle_camera_preview(bool p_activate) {
} else {
previewing = preview;
- previewing->connect("tree_exiting", this, "_preview_exited_scene");
+ previewing->connect_compat("tree_exiting", this, "_preview_exited_scene");
VS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), preview->get_camera()); //replace
view_menu->set_disabled(true);
surface->update();
@@ -2925,7 +2925,7 @@ void SpatialEditorViewport::_toggle_cinema_preview(bool p_activate) {
previewing_cinema = p_activate;
if (!previewing_cinema) {
if (previewing != NULL)
- previewing->disconnect("tree_exited", this, "_preview_exited_scene");
+ previewing->disconnect_compat("tree_exited", this, "_preview_exited_scene");
previewing = NULL;
VS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), camera->get_camera()); //restore
@@ -3110,14 +3110,14 @@ void SpatialEditorViewport::set_state(const Dictionary &p_state) {
view_menu->get_popup()->set_item_checked(idx, previewing_cinema);
}
- if (preview_camera->is_connected("toggled", this, "_toggle_camera_preview")) {
- preview_camera->disconnect("toggled", this, "_toggle_camera_preview");
+ if (preview_camera->is_connected_compat("toggled", this, "_toggle_camera_preview")) {
+ preview_camera->disconnect_compat("toggled", this, "_toggle_camera_preview");
}
if (p_state.has("previewing")) {
Node *pv = EditorNode::get_singleton()->get_edited_scene()->get_node(p_state["previewing"]);
if (Object::cast_to<Camera>(pv)) {
previewing = Object::cast_to<Camera>(pv);
- previewing->connect("tree_exiting", this, "_preview_exited_scene");
+ previewing->connect_compat("tree_exiting", this, "_preview_exited_scene");
VS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), previewing->get_camera()); //replace
view_menu->set_disabled(true);
surface->update();
@@ -3125,7 +3125,7 @@ void SpatialEditorViewport::set_state(const Dictionary &p_state) {
preview_camera->show();
}
}
- preview_camera->connect("toggled", this, "_toggle_camera_preview");
+ preview_camera->connect_compat("toggled", this, "_toggle_camera_preview");
}
Dictionary SpatialEditorViewport::get_state() const {
@@ -3684,8 +3684,8 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/focus_selection"), VIEW_CENTER_TO_SELECTION);
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/align_transform_with_view"), VIEW_ALIGN_TRANSFORM_WITH_VIEW);
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/align_rotation_with_view"), VIEW_ALIGN_ROTATION_WITH_VIEW);
- view_menu->get_popup()->connect("id_pressed", this, "_menu_option");
- display_submenu->connect("id_pressed", this, "_menu_option");
+ view_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option");
+ display_submenu->connect_compat("id_pressed", this, "_menu_option");
view_menu->set_disable_shortcuts(true);
if (OS::get_singleton()->get_current_video_driver() == OS::VIDEO_DRIVER_GLES2) {
@@ -3720,7 +3720,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
vbox->add_child(preview_camera);
preview_camera->set_h_size_flags(0);
preview_camera->hide();
- preview_camera->connect("toggled", this, "_toggle_camera_preview");
+ preview_camera->connect_compat("toggled", this, "_toggle_camera_preview");
previewing = NULL;
gizmo_scale = 1.0;
@@ -3773,8 +3773,8 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
selection_menu = memnew(PopupMenu);
add_child(selection_menu);
selection_menu->set_custom_minimum_size(Size2(100, 0) * EDSCALE);
- selection_menu->connect("id_pressed", this, "_selection_result_pressed");
- selection_menu->connect("popup_hide", this, "_selection_menu_hide");
+ selection_menu->connect_compat("id_pressed", this, "_selection_result_pressed");
+ selection_menu->connect_compat("popup_hide", this, "_selection_menu_hide");
if (p_index == 0) {
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_AUDIO_LISTENER), true);
@@ -3784,7 +3784,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
name = "";
_update_name();
- EditorSettings::get_singleton()->connect("settings_changed", this, "update_transform_gizmo_view");
+ EditorSettings::get_singleton()->connect_compat("settings_changed", this, "update_transform_gizmo_view");
}
//////////////////////////////////////////////////////////////
@@ -5471,12 +5471,12 @@ void SpatialEditor::_notification(int p_what) {
_refresh_menu_icons();
- get_tree()->connect("node_removed", this, "_node_removed");
- EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor()->connect("node_changed", this, "_refresh_menu_icons");
- editor_selection->connect("selection_changed", this, "_refresh_menu_icons");
+ get_tree()->connect_compat("node_removed", this, "_node_removed");
+ EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor()->connect_compat("node_changed", this, "_refresh_menu_icons");
+ editor_selection->connect_compat("selection_changed", this, "_refresh_menu_icons");
- editor->connect("stop_pressed", this, "_update_camera_override_button", make_binds(false));
- editor->connect("play_pressed", this, "_update_camera_override_button", make_binds(true));
+ editor->connect_compat("stop_pressed", this, "_update_camera_override_button", make_binds(false));
+ editor->connect_compat("play_pressed", this, "_update_camera_override_button", make_binds(true));
} else if (p_what == NOTIFICATION_ENTER_TREE) {
_register_all_gizmos();
@@ -5732,7 +5732,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
tool_button[TOOL_MODE_SELECT]->set_flat(true);
tool_button[TOOL_MODE_SELECT]->set_pressed(true);
button_binds.write[0] = MENU_TOOL_SELECT;
- tool_button[TOOL_MODE_SELECT]->connect("pressed", this, "_menu_item_pressed", button_binds);
+ tool_button[TOOL_MODE_SELECT]->connect_compat("pressed", this, "_menu_item_pressed", button_binds);
tool_button[TOOL_MODE_SELECT]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_select", TTR("Select Mode"), KEY_Q));
tool_button[TOOL_MODE_SELECT]->set_tooltip(keycode_get_string(KEY_MASK_CMD) + TTR("Drag: Rotate\nAlt+Drag: Move\nAlt+RMB: Depth list selection"));
@@ -5743,7 +5743,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
tool_button[TOOL_MODE_MOVE]->set_toggle_mode(true);
tool_button[TOOL_MODE_MOVE]->set_flat(true);
button_binds.write[0] = MENU_TOOL_MOVE;
- tool_button[TOOL_MODE_MOVE]->connect("pressed", this, "_menu_item_pressed", button_binds);
+ tool_button[TOOL_MODE_MOVE]->connect_compat("pressed", this, "_menu_item_pressed", button_binds);
tool_button[TOOL_MODE_MOVE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_move", TTR("Move Mode"), KEY_W));
tool_button[TOOL_MODE_ROTATE] = memnew(ToolButton);
@@ -5751,7 +5751,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
tool_button[TOOL_MODE_ROTATE]->set_toggle_mode(true);
tool_button[TOOL_MODE_ROTATE]->set_flat(true);
button_binds.write[0] = MENU_TOOL_ROTATE;
- tool_button[TOOL_MODE_ROTATE]->connect("pressed", this, "_menu_item_pressed", button_binds);
+ tool_button[TOOL_MODE_ROTATE]->connect_compat("pressed", this, "_menu_item_pressed", button_binds);
tool_button[TOOL_MODE_ROTATE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_rotate", TTR("Rotate Mode"), KEY_E));
tool_button[TOOL_MODE_SCALE] = memnew(ToolButton);
@@ -5759,7 +5759,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
tool_button[TOOL_MODE_SCALE]->set_toggle_mode(true);
tool_button[TOOL_MODE_SCALE]->set_flat(true);
button_binds.write[0] = MENU_TOOL_SCALE;
- tool_button[TOOL_MODE_SCALE]->connect("pressed", this, "_menu_item_pressed", button_binds);
+ tool_button[TOOL_MODE_SCALE]->connect_compat("pressed", this, "_menu_item_pressed", button_binds);
tool_button[TOOL_MODE_SCALE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_scale", TTR("Scale Mode"), KEY_R));
hbc_menu->add_child(memnew(VSeparator));
@@ -5769,31 +5769,31 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
tool_button[TOOL_MODE_LIST_SELECT]->set_toggle_mode(true);
tool_button[TOOL_MODE_LIST_SELECT]->set_flat(true);
button_binds.write[0] = MENU_TOOL_LIST_SELECT;
- tool_button[TOOL_MODE_LIST_SELECT]->connect("pressed", this, "_menu_item_pressed", button_binds);
+ tool_button[TOOL_MODE_LIST_SELECT]->connect_compat("pressed", this, "_menu_item_pressed", button_binds);
tool_button[TOOL_MODE_LIST_SELECT]->set_tooltip(TTR("Show a list of all objects at the position clicked\n(same as Alt+RMB in select mode)."));
tool_button[TOOL_LOCK_SELECTED] = memnew(ToolButton);
hbc_menu->add_child(tool_button[TOOL_LOCK_SELECTED]);
button_binds.write[0] = MENU_LOCK_SELECTED;
- tool_button[TOOL_LOCK_SELECTED]->connect("pressed", this, "_menu_item_pressed", button_binds);
+ tool_button[TOOL_LOCK_SELECTED]->connect_compat("pressed", this, "_menu_item_pressed", button_binds);
tool_button[TOOL_LOCK_SELECTED]->set_tooltip(TTR("Lock the selected object in place (can't be moved)."));
tool_button[TOOL_UNLOCK_SELECTED] = memnew(ToolButton);
hbc_menu->add_child(tool_button[TOOL_UNLOCK_SELECTED]);
button_binds.write[0] = MENU_UNLOCK_SELECTED;
- tool_button[TOOL_UNLOCK_SELECTED]->connect("pressed", this, "_menu_item_pressed", button_binds);
+ tool_button[TOOL_UNLOCK_SELECTED]->connect_compat("pressed", this, "_menu_item_pressed", button_binds);
tool_button[TOOL_UNLOCK_SELECTED]->set_tooltip(TTR("Unlock the selected object (can be moved)."));
tool_button[TOOL_GROUP_SELECTED] = memnew(ToolButton);
hbc_menu->add_child(tool_button[TOOL_GROUP_SELECTED]);
button_binds.write[0] = MENU_GROUP_SELECTED;
- tool_button[TOOL_GROUP_SELECTED]->connect("pressed", this, "_menu_item_pressed", button_binds);
+ tool_button[TOOL_GROUP_SELECTED]->connect_compat("pressed", this, "_menu_item_pressed", button_binds);
tool_button[TOOL_GROUP_SELECTED]->set_tooltip(TTR("Makes sure the object's children are not selectable."));
tool_button[TOOL_UNGROUP_SELECTED] = memnew(ToolButton);
hbc_menu->add_child(tool_button[TOOL_UNGROUP_SELECTED]);
button_binds.write[0] = MENU_UNGROUP_SELECTED;
- tool_button[TOOL_UNGROUP_SELECTED]->connect("pressed", this, "_menu_item_pressed", button_binds);
+ tool_button[TOOL_UNGROUP_SELECTED]->connect_compat("pressed", this, "_menu_item_pressed", button_binds);
tool_button[TOOL_UNGROUP_SELECTED]->set_tooltip(TTR("Restores the object's children's ability to be selected."));
hbc_menu->add_child(memnew(VSeparator));
@@ -5803,7 +5803,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_toggle_mode(true);
tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_flat(true);
button_binds.write[0] = MENU_TOOL_LOCAL_COORDS;
- tool_option_button[TOOL_OPT_LOCAL_COORDS]->connect("toggled", this, "_menu_item_toggled", button_binds);
+ tool_option_button[TOOL_OPT_LOCAL_COORDS]->connect_compat("toggled", this, "_menu_item_toggled", button_binds);
tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_shortcut(ED_SHORTCUT("spatial_editor/local_coords", TTR("Use Local Space"), KEY_T));
tool_option_button[TOOL_OPT_USE_SNAP] = memnew(ToolButton);
@@ -5811,7 +5811,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
tool_option_button[TOOL_OPT_USE_SNAP]->set_toggle_mode(true);
tool_option_button[TOOL_OPT_USE_SNAP]->set_flat(true);
button_binds.write[0] = MENU_TOOL_USE_SNAP;
- tool_option_button[TOOL_OPT_USE_SNAP]->connect("toggled", this, "_menu_item_toggled", button_binds);
+ tool_option_button[TOOL_OPT_USE_SNAP]->connect_compat("toggled", this, "_menu_item_toggled", button_binds);
tool_option_button[TOOL_OPT_USE_SNAP]->set_shortcut(ED_SHORTCUT("spatial_editor/snap", TTR("Use Snap"), KEY_Y));
hbc_menu->add_child(memnew(VSeparator));
@@ -5822,7 +5822,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->set_flat(true);
tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->set_disabled(true);
button_binds.write[0] = MENU_TOOL_OVERRIDE_CAMERA;
- tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->connect("toggled", this, "_menu_item_toggled", button_binds);
+ tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->connect_compat("toggled", this, "_menu_item_toggled", button_binds);
_update_camera_override_button(false);
hbc_menu->add_child(memnew(VSeparator));
@@ -5859,7 +5859,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
p->add_separator();
p->add_shortcut(ED_SHORTCUT("spatial_editor/configure_snap", TTR("Configure Snap...")), MENU_TRANSFORM_CONFIGURE_SNAP);
- p->connect("id_pressed", this, "_menu_item_pressed");
+ p->connect_compat("id_pressed", this, "_menu_item_pressed");
view_menu = memnew(MenuButton);
view_menu->set_text(TTR("View"));
@@ -5891,13 +5891,13 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
p->set_item_checked(p->get_item_index(MENU_VIEW_ORIGIN), true);
p->set_item_checked(p->get_item_index(MENU_VIEW_GRID), true);
- p->connect("id_pressed", this, "_menu_item_pressed");
+ p->connect_compat("id_pressed", this, "_menu_item_pressed");
gizmos_menu = memnew(PopupMenu);
p->add_child(gizmos_menu);
gizmos_menu->set_name("GizmosMenu");
gizmos_menu->set_hide_on_checkable_item_selection(false);
- gizmos_menu->connect("id_pressed", this, "_menu_gizmo_toggled");
+ gizmos_menu->connect_compat("id_pressed", this, "_menu_gizmo_toggled");
/* REST OF MENU */
@@ -5914,8 +5914,8 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
for (uint32_t i = 0; i < VIEWPORTS_COUNT; i++) {
viewports[i] = memnew(SpatialEditorViewport(this, editor, i));
- viewports[i]->connect("toggle_maximize_view", this, "_toggle_maximize_view");
- viewports[i]->connect("clicked", this, "_update_camera_override_viewport");
+ viewports[i]->connect_compat("toggle_maximize_view", this, "_toggle_maximize_view");
+ viewports[i]->connect_compat("clicked", this, "_update_camera_override_viewport");
viewports[i]->assign_pending_data_pointers(preview_node, &preview_bounds, accept);
viewport_base->add_child(viewports[i]);
}
@@ -6030,7 +6030,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
xform_type->add_item(TTR("Post"));
xform_vbc->add_child(xform_type);
- xform_dialog->connect("confirmed", this, "_xform_dialog_action");
+ xform_dialog->connect_compat("confirmed", this, "_xform_dialog_action");
scenario_debug = VisualServer::SCENARIO_DEBUG_DISABLED;
@@ -6184,7 +6184,7 @@ SpatialEditorPlugin::SpatialEditorPlugin(EditorNode *p_node) {
editor->get_viewport()->add_child(spatial_editor);
spatial_editor->hide();
- spatial_editor->connect("transform_key_request", editor->get_inspector_dock(), "_transform_keyed");
+ spatial_editor->connect_compat("transform_key_request", editor->get_inspector_dock(), "_transform_keyed");
}
SpatialEditorPlugin::~SpatialEditorPlugin() {
diff --git a/editor/plugins/sprite_editor_plugin.cpp b/editor/plugins/sprite_editor_plugin.cpp
index e69440b5bb..92bdbdd733 100644
--- a/editor/plugins/sprite_editor_plugin.cpp
+++ b/editor/plugins/sprite_editor_plugin.cpp
@@ -526,7 +526,7 @@ SpriteEditor::SpriteEditor() {
options->get_popup()->add_item(TTR("Create LightOccluder2D Sibling"), MENU_OPTION_CREATE_LIGHT_OCCLUDER_2D);
options->set_switch_on_hover(true);
- options->get_popup()->connect("id_pressed", this, "_menu_option");
+ options->get_popup()->connect_compat("id_pressed", this, "_menu_option");
err_dialog = memnew(AcceptDialog);
add_child(err_dialog);
@@ -542,9 +542,9 @@ SpriteEditor::SpriteEditor() {
scroll->set_enable_v_scroll(true);
vb->add_margin_child(TTR("Preview:"), scroll, true);
debug_uv = memnew(Control);
- debug_uv->connect("draw", this, "_debug_uv_draw");
+ debug_uv->connect_compat("draw", this, "_debug_uv_draw");
scroll->add_child(debug_uv);
- debug_uv_dialog->connect("confirmed", this, "_create_node");
+ debug_uv_dialog->connect_compat("confirmed", this, "_create_node");
HBoxContainer *hb = memnew(HBoxContainer);
hb->add_child(memnew(Label(TTR("Simplification: "))));
@@ -573,7 +573,7 @@ SpriteEditor::SpriteEditor() {
hb->add_spacer();
update_preview = memnew(Button);
update_preview->set_text(TTR("Update Preview"));
- update_preview->connect("pressed", this, "_update_mesh_data");
+ update_preview->connect_compat("pressed", this, "_update_mesh_data");
hb->add_child(update_preview);
vb->add_margin_child(TTR("Settings:"), hb);
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index 9e8ce7ac4a..81f2a222da 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -905,19 +905,19 @@ SpriteFramesEditor::SpriteFramesEditor() {
new_anim = memnew(ToolButton);
new_anim->set_tooltip(TTR("New Animation"));
hbc_animlist->add_child(new_anim);
- new_anim->connect("pressed", this, "_animation_add");
+ new_anim->connect_compat("pressed", this, "_animation_add");
remove_anim = memnew(ToolButton);
remove_anim->set_tooltip(TTR("Remove Animation"));
hbc_animlist->add_child(remove_anim);
- remove_anim->connect("pressed", this, "_animation_remove");
+ remove_anim->connect_compat("pressed", this, "_animation_remove");
animations = memnew(Tree);
sub_vb->add_child(animations);
animations->set_v_size_flags(SIZE_EXPAND_FILL);
animations->set_hide_root(true);
- animations->connect("cell_selected", this, "_animation_select");
- animations->connect("item_edited", this, "_animation_name_edited");
+ animations->connect_compat("cell_selected", this, "_animation_select");
+ animations->connect_compat("item_edited", this, "_animation_name_edited");
animations->set_allow_reselect(true);
anim_speed = memnew(SpinBox);
@@ -925,12 +925,12 @@ SpriteFramesEditor::SpriteFramesEditor() {
anim_speed->set_min(0);
anim_speed->set_max(100);
anim_speed->set_step(0.01);
- anim_speed->connect("value_changed", this, "_animation_fps_changed");
+ anim_speed->connect_compat("value_changed", this, "_animation_fps_changed");
anim_loop = memnew(CheckButton);
anim_loop->set_text(TTR("Loop"));
vbc_animlist->add_child(anim_loop);
- anim_loop->connect("pressed", this, "_animation_loop_changed");
+ anim_loop->connect_compat("pressed", this, "_animation_loop_changed");
VBoxContainer *vbc = memnew(VBoxContainer);
add_child(vbc);
@@ -1004,16 +1004,16 @@ SpriteFramesEditor::SpriteFramesEditor() {
dialog = memnew(AcceptDialog);
add_child(dialog);
- load->connect("pressed", this, "_load_pressed");
- load_sheet->connect("pressed", this, "_open_sprite_sheet");
- _delete->connect("pressed", this, "_delete_pressed");
- copy->connect("pressed", this, "_copy_pressed");
- paste->connect("pressed", this, "_paste_pressed");
- empty->connect("pressed", this, "_empty_pressed");
- empty2->connect("pressed", this, "_empty2_pressed");
- move_up->connect("pressed", this, "_up_pressed");
- move_down->connect("pressed", this, "_down_pressed");
- file->connect("files_selected", this, "_file_load_request");
+ load->connect_compat("pressed", this, "_load_pressed");
+ load_sheet->connect_compat("pressed", this, "_open_sprite_sheet");
+ _delete->connect_compat("pressed", this, "_delete_pressed");
+ copy->connect_compat("pressed", this, "_copy_pressed");
+ paste->connect_compat("pressed", this, "_paste_pressed");
+ empty->connect_compat("pressed", this, "_empty_pressed");
+ empty2->connect_compat("pressed", this, "_empty2_pressed");
+ move_up->connect_compat("pressed", this, "_up_pressed");
+ move_down->connect_compat("pressed", this, "_down_pressed");
+ file->connect_compat("files_selected", this, "_file_load_request");
loading_scene = false;
sel = -1;
@@ -1023,14 +1023,14 @@ SpriteFramesEditor::SpriteFramesEditor() {
delete_dialog = memnew(ConfirmationDialog);
add_child(delete_dialog);
- delete_dialog->connect("confirmed", this, "_animation_remove_confirmed");
+ delete_dialog->connect_compat("confirmed", this, "_animation_remove_confirmed");
split_sheet_dialog = memnew(ConfirmationDialog);
add_child(split_sheet_dialog);
VBoxContainer *split_sheet_vb = memnew(VBoxContainer);
split_sheet_dialog->add_child(split_sheet_vb);
split_sheet_dialog->set_title(TTR("Select Frames"));
- split_sheet_dialog->connect("confirmed", this, "_sheet_add_frames");
+ split_sheet_dialog->connect_compat("confirmed", this, "_sheet_add_frames");
HBoxContainer *split_sheet_hb = memnew(HBoxContainer);
@@ -1041,7 +1041,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
split_sheet_h->set_max(128);
split_sheet_h->set_step(1);
split_sheet_hb->add_child(split_sheet_h);
- split_sheet_h->connect("value_changed", this, "_sheet_spin_changed");
+ split_sheet_h->connect_compat("value_changed", this, "_sheet_spin_changed");
ss_label = memnew(Label(TTR("Vertical:")));
split_sheet_hb->add_child(ss_label);
@@ -1050,13 +1050,13 @@ SpriteFramesEditor::SpriteFramesEditor() {
split_sheet_v->set_max(128);
split_sheet_v->set_step(1);
split_sheet_hb->add_child(split_sheet_v);
- split_sheet_v->connect("value_changed", this, "_sheet_spin_changed");
+ split_sheet_v->connect_compat("value_changed", this, "_sheet_spin_changed");
split_sheet_hb->add_spacer();
Button *select_clear_all = memnew(Button);
select_clear_all->set_text(TTR("Select/Clear All Frames"));
- select_clear_all->connect("pressed", this, "_sheet_select_clear_all_frames");
+ select_clear_all->connect_compat("pressed", this, "_sheet_select_clear_all_frames");
split_sheet_hb->add_child(select_clear_all);
split_sheet_vb->add_child(split_sheet_hb);
@@ -1064,8 +1064,8 @@ SpriteFramesEditor::SpriteFramesEditor() {
split_sheet_preview = memnew(TextureRect);
split_sheet_preview->set_expand(false);
split_sheet_preview->set_mouse_filter(MOUSE_FILTER_PASS);
- split_sheet_preview->connect("draw", this, "_sheet_preview_draw");
- split_sheet_preview->connect("gui_input", this, "_sheet_preview_input");
+ split_sheet_preview->connect_compat("draw", this, "_sheet_preview_draw");
+ split_sheet_preview->connect_compat("gui_input", this, "_sheet_preview_input");
splite_sheet_scroll = memnew(ScrollContainer);
splite_sheet_scroll->set_enable_h_scroll(true);
@@ -1083,7 +1083,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
file_split_sheet->set_title(TTR("Create Frames from Sprite Sheet"));
file_split_sheet->set_mode(EditorFileDialog::MODE_OPEN_FILE);
add_child(file_split_sheet);
- file_split_sheet->connect("file_selected", this, "_prepare_sprite_sheet");
+ file_split_sheet->connect_compat("file_selected", this, "_prepare_sprite_sheet");
}
void SpriteFramesEditorPlugin::edit(Object *p_object) {
diff --git a/editor/plugins/style_box_editor_plugin.cpp b/editor/plugins/style_box_editor_plugin.cpp
index eebcd567a4..a9936658c3 100644
--- a/editor/plugins/style_box_editor_plugin.cpp
+++ b/editor/plugins/style_box_editor_plugin.cpp
@@ -54,11 +54,11 @@ void EditorInspectorPluginStyleBox::parse_end() {
void StyleBoxPreview::edit(const Ref<StyleBox> &p_stylebox) {
if (stylebox.is_valid())
- stylebox->disconnect("changed", this, "_sb_changed");
+ stylebox->disconnect_compat("changed", this, "_sb_changed");
stylebox = p_stylebox;
if (p_stylebox.is_valid()) {
preview->add_style_override("panel", stylebox);
- stylebox->connect("changed", this, "_sb_changed");
+ stylebox->connect_compat("changed", this, "_sb_changed");
}
_sb_changed();
}
@@ -91,7 +91,7 @@ StyleBoxPreview::StyleBoxPreview() {
preview = memnew(Control);
preview->set_custom_minimum_size(Size2(0, 150 * EDSCALE));
preview->set_clip_contents(true);
- preview->connect("draw", this, "_redraw");
+ preview->connect_compat("draw", this, "_redraw");
add_margin_child(TTR("Preview:"), preview);
}
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index 357af5ecd8..a8b6d74c1f 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -633,19 +633,19 @@ TextEditor::TextEditor() {
code_editor = memnew(CodeTextEditor);
add_child(code_editor);
code_editor->add_constant_override("separation", 0);
- code_editor->connect("load_theme_settings", this, "_load_theme_settings");
- code_editor->connect("validate_script", this, "_validate_script");
+ code_editor->connect_compat("load_theme_settings", this, "_load_theme_settings");
+ code_editor->connect_compat("validate_script", this, "_validate_script");
code_editor->set_anchors_and_margins_preset(Control::PRESET_WIDE);
code_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL);
update_settings();
code_editor->get_text_edit()->set_context_menu_enabled(false);
- code_editor->get_text_edit()->connect("gui_input", this, "_text_edit_gui_input");
+ code_editor->get_text_edit()->connect_compat("gui_input", this, "_text_edit_gui_input");
context_menu = memnew(PopupMenu);
add_child(context_menu);
- context_menu->connect("id_pressed", this, "_edit_option");
+ context_menu->connect_compat("id_pressed", this, "_edit_option");
edit_hb = memnew(HBoxContainer);
@@ -653,7 +653,7 @@ TextEditor::TextEditor() {
edit_hb->add_child(search_menu);
search_menu->set_text(TTR("Search"));
search_menu->set_switch_on_hover(true);
- search_menu->get_popup()->connect("id_pressed", this, "_edit_option");
+ search_menu->get_popup()->connect_compat("id_pressed", this, "_edit_option");
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find"), SEARCH_FIND);
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_next"), SEARCH_FIND_NEXT);
@@ -667,7 +667,7 @@ TextEditor::TextEditor() {
edit_hb->add_child(edit_menu);
edit_menu->set_text(TTR("Edit"));
edit_menu->set_switch_on_hover(true);
- edit_menu->get_popup()->connect("id_pressed", this, "_edit_option");
+ edit_menu->get_popup()->connect_compat("id_pressed", this, "_edit_option");
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/undo"), EDIT_UNDO);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/redo"), EDIT_REDO);
@@ -700,7 +700,7 @@ TextEditor::TextEditor() {
convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_uppercase", TTR("Uppercase")), EDIT_TO_UPPERCASE);
convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_lowercase", TTR("Lowercase")), EDIT_TO_LOWERCASE);
convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/capitalize", TTR("Capitalize")), EDIT_CAPITALIZE);
- convert_case->connect("id_pressed", this, "_edit_option");
+ convert_case->connect_compat("id_pressed", this, "_edit_option");
highlighters["Standard"] = NULL;
highlighter_menu = memnew(PopupMenu);
@@ -708,13 +708,13 @@ TextEditor::TextEditor() {
edit_menu->get_popup()->add_child(highlighter_menu);
edit_menu->get_popup()->add_submenu_item(TTR("Syntax Highlighter"), "highlighter_menu");
highlighter_menu->add_radio_check_item(TTR("Standard"));
- highlighter_menu->connect("id_pressed", this, "_change_syntax_highlighter");
+ highlighter_menu->connect_compat("id_pressed", this, "_change_syntax_highlighter");
MenuButton *goto_menu = memnew(MenuButton);
edit_hb->add_child(goto_menu);
goto_menu->set_text(TTR("Go To"));
goto_menu->set_switch_on_hover(true);
- goto_menu->get_popup()->connect("id_pressed", this, "_edit_option");
+ goto_menu->get_popup()->connect_compat("id_pressed", this, "_edit_option");
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE);
goto_menu->get_popup()->add_separator();
@@ -724,8 +724,8 @@ TextEditor::TextEditor() {
goto_menu->get_popup()->add_child(bookmarks_menu);
goto_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "Bookmarks");
_update_bookmark_list();
- bookmarks_menu->connect("about_to_show", this, "_update_bookmark_list");
- bookmarks_menu->connect("index_pressed", this, "_bookmark_item_pressed");
+ bookmarks_menu->connect_compat("about_to_show", this, "_update_bookmark_list");
+ bookmarks_menu->connect_compat("index_pressed", this, "_bookmark_item_pressed");
goto_line_dialog = memnew(GotoLineDialog);
add_child(goto_line_dialog);
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index 2350c20cb7..065833fd2b 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -935,7 +935,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
snap_mode_button->add_item(TTR("Grid Snap"), 2);
snap_mode_button->add_item(TTR("Auto Slice"), 3);
snap_mode_button->select(0);
- snap_mode_button->connect("item_selected", this, "_set_snap_mode");
+ snap_mode_button->connect_compat("item_selected", this, "_set_snap_mode");
hb_grid = memnew(HBoxContainer);
hb_tools->add_child(hb_grid);
@@ -949,7 +949,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
sb_off_x->set_step(1);
sb_off_x->set_value(snap_offset.x);
sb_off_x->set_suffix("px");
- sb_off_x->connect("value_changed", this, "_set_snap_off_x");
+ sb_off_x->connect_compat("value_changed", this, "_set_snap_off_x");
hb_grid->add_child(sb_off_x);
sb_off_y = memnew(SpinBox);
@@ -958,7 +958,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
sb_off_y->set_step(1);
sb_off_y->set_value(snap_offset.y);
sb_off_y->set_suffix("px");
- sb_off_y->connect("value_changed", this, "_set_snap_off_y");
+ sb_off_y->connect_compat("value_changed", this, "_set_snap_off_y");
hb_grid->add_child(sb_off_y);
hb_grid->add_child(memnew(VSeparator));
@@ -970,7 +970,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
sb_step_x->set_step(1);
sb_step_x->set_value(snap_step.x);
sb_step_x->set_suffix("px");
- sb_step_x->connect("value_changed", this, "_set_snap_step_x");
+ sb_step_x->connect_compat("value_changed", this, "_set_snap_step_x");
hb_grid->add_child(sb_step_x);
sb_step_y = memnew(SpinBox);
@@ -979,7 +979,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
sb_step_y->set_step(1);
sb_step_y->set_value(snap_step.y);
sb_step_y->set_suffix("px");
- sb_step_y->connect("value_changed", this, "_set_snap_step_y");
+ sb_step_y->connect_compat("value_changed", this, "_set_snap_step_y");
hb_grid->add_child(sb_step_y);
hb_grid->add_child(memnew(VSeparator));
@@ -991,7 +991,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
sb_sep_x->set_step(1);
sb_sep_x->set_value(snap_separation.x);
sb_sep_x->set_suffix("px");
- sb_sep_x->connect("value_changed", this, "_set_snap_sep_x");
+ sb_sep_x->connect_compat("value_changed", this, "_set_snap_sep_x");
hb_grid->add_child(sb_sep_x);
sb_sep_y = memnew(SpinBox);
@@ -1000,7 +1000,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
sb_sep_y->set_step(1);
sb_sep_y->set_value(snap_separation.y);
sb_sep_y->set_suffix("px");
- sb_sep_y->connect("value_changed", this, "_set_snap_sep_y");
+ sb_sep_y->connect_compat("value_changed", this, "_set_snap_sep_y");
hb_grid->add_child(sb_sep_y);
hb_grid->hide();
@@ -1008,8 +1008,8 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
edit_draw = memnew(Panel);
add_child(edit_draw);
edit_draw->set_v_size_flags(SIZE_EXPAND_FILL);
- edit_draw->connect("draw", this, "_region_draw");
- edit_draw->connect("gui_input", this, "_region_input");
+ edit_draw->connect_compat("draw", this, "_region_draw");
+ edit_draw->connect_compat("gui_input", this, "_region_input");
draw_zoom = 1.0;
edit_draw->set_clip_contents(true);
@@ -1020,27 +1020,27 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
zoom_out = memnew(ToolButton);
zoom_out->set_tooltip(TTR("Zoom Out"));
- zoom_out->connect("pressed", this, "_zoom_out");
+ zoom_out->connect_compat("pressed", this, "_zoom_out");
zoom_hb->add_child(zoom_out);
zoom_reset = memnew(ToolButton);
zoom_reset->set_tooltip(TTR("Zoom Reset"));
- zoom_reset->connect("pressed", this, "_zoom_reset");
+ zoom_reset->connect_compat("pressed", this, "_zoom_reset");
zoom_hb->add_child(zoom_reset);
zoom_in = memnew(ToolButton);
zoom_in->set_tooltip(TTR("Zoom In"));
- zoom_in->connect("pressed", this, "_zoom_in");
+ zoom_in->connect_compat("pressed", this, "_zoom_in");
zoom_hb->add_child(zoom_in);
vscroll = memnew(VScrollBar);
vscroll->set_step(0.001);
edit_draw->add_child(vscroll);
- vscroll->connect("value_changed", this, "_scroll_changed");
+ vscroll->connect_compat("value_changed", this, "_scroll_changed");
hscroll = memnew(HScrollBar);
hscroll->set_step(0.001);
edit_draw->add_child(hscroll);
- hscroll->connect("value_changed", this, "_scroll_changed");
+ hscroll->connect_compat("value_changed", this, "_scroll_changed");
updating_scroll = false;
}
@@ -1125,7 +1125,7 @@ TextureRegionEditorPlugin::TextureRegionEditorPlugin(EditorNode *p_node) {
region_editor = memnew(TextureRegionEditor(p_node));
region_editor->set_custom_minimum_size(Size2(0, 200) * EDSCALE);
region_editor->hide();
- region_editor->connect("visibility_changed", this, "_editor_visiblity_changed");
+ region_editor->connect_compat("visibility_changed", this, "_editor_visiblity_changed");
texture_region_button = p_node->add_bottom_panel_item(TTR("TextureRegion"), region_editor);
texture_region_button->hide();
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp
index 48d80a0017..717c9adad3 100644
--- a/editor/plugins/theme_editor_plugin.cpp
+++ b/editor/plugins/theme_editor_plugin.cpp
@@ -629,7 +629,7 @@ ThemeEditor::ThemeEditor() {
theme_menu->get_popup()->add_item(TTR("Create Empty Editor Template"), POPUP_CREATE_EDITOR_EMPTY);
theme_menu->get_popup()->add_item(TTR("Create From Current Editor Theme"), POPUP_IMPORT_EDITOR_THEME);
top_menu->add_child(theme_menu);
- theme_menu->get_popup()->connect("id_pressed", this, "_theme_menu_cbk");
+ theme_menu->get_popup()->connect_compat("id_pressed", this, "_theme_menu_cbk");
ScrollContainer *scroll = memnew(ScrollContainer);
add_child(scroll);
@@ -835,7 +835,7 @@ ThemeEditor::ThemeEditor() {
type_menu->set_text("..");
type_hbc->add_child(type_menu);
- type_menu->get_popup()->connect("id_pressed", this, "_type_menu_cbk");
+ type_menu->get_popup()->connect_compat("id_pressed", this, "_type_menu_cbk");
l = memnew(Label);
l->set_text(TTR("Name:"));
@@ -853,8 +853,8 @@ ThemeEditor::ThemeEditor() {
name_menu->set_text("..");
name_hbc->add_child(name_menu);
- name_menu->get_popup()->connect("about_to_show", this, "_name_menu_about_to_show");
- name_menu->get_popup()->connect("id_pressed", this, "_name_menu_cbk");
+ name_menu->get_popup()->connect_compat("about_to_show", this, "_name_menu_about_to_show");
+ name_menu->get_popup()->connect_compat("id_pressed", this, "_name_menu_cbk");
type_select_label = memnew(Label);
type_select_label->set_text(TTR("Data Type:"));
@@ -869,12 +869,12 @@ ThemeEditor::ThemeEditor() {
dialog_vbc->add_child(type_select);
- add_del_dialog->get_ok()->connect("pressed", this, "_dialog_cbk");
+ add_del_dialog->get_ok()->connect_compat("pressed", this, "_dialog_cbk");
file_dialog = memnew(EditorFileDialog);
file_dialog->add_filter("*.theme ; " + TTR("Theme File"));
add_child(file_dialog);
- file_dialog->connect("file_selected", this, "_save_template_cbk");
+ file_dialog->connect_compat("file_selected", this, "_save_template_cbk");
}
void ThemeEditorPlugin::edit(Object *p_node) {
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp
index 145263a5ab..a7115fc9a2 100644
--- a/editor/plugins/tile_map_editor_plugin.cpp
+++ b/editor/plugins/tile_map_editor_plugin.cpp
@@ -1761,30 +1761,30 @@ void TileMapEditor::edit(Node *p_tile_map) {
}
if (node)
- node->disconnect("settings_changed", this, "_tileset_settings_changed");
+ node->disconnect_compat("settings_changed", this, "_tileset_settings_changed");
if (p_tile_map) {
node = Object::cast_to<TileMap>(p_tile_map);
- if (!canvas_item_editor_viewport->is_connected("mouse_entered", this, "_canvas_mouse_enter"))
- canvas_item_editor_viewport->connect("mouse_entered", this, "_canvas_mouse_enter");
- if (!canvas_item_editor_viewport->is_connected("mouse_exited", this, "_canvas_mouse_exit"))
- canvas_item_editor_viewport->connect("mouse_exited", this, "_canvas_mouse_exit");
+ if (!canvas_item_editor_viewport->is_connected_compat("mouse_entered", this, "_canvas_mouse_enter"))
+ canvas_item_editor_viewport->connect_compat("mouse_entered", this, "_canvas_mouse_enter");
+ if (!canvas_item_editor_viewport->is_connected_compat("mouse_exited", this, "_canvas_mouse_exit"))
+ canvas_item_editor_viewport->connect_compat("mouse_exited", this, "_canvas_mouse_exit");
_update_palette();
} else {
node = NULL;
- if (canvas_item_editor_viewport->is_connected("mouse_entered", this, "_canvas_mouse_enter"))
- canvas_item_editor_viewport->disconnect("mouse_entered", this, "_canvas_mouse_enter");
- if (canvas_item_editor_viewport->is_connected("mouse_exited", this, "_canvas_mouse_exit"))
- canvas_item_editor_viewport->disconnect("mouse_exited", this, "_canvas_mouse_exit");
+ if (canvas_item_editor_viewport->is_connected_compat("mouse_entered", this, "_canvas_mouse_enter"))
+ canvas_item_editor_viewport->disconnect_compat("mouse_entered", this, "_canvas_mouse_enter");
+ if (canvas_item_editor_viewport->is_connected_compat("mouse_exited", this, "_canvas_mouse_exit"))
+ canvas_item_editor_viewport->disconnect_compat("mouse_exited", this, "_canvas_mouse_exit");
_update_palette();
}
if (node)
- node->connect("settings_changed", this, "_tileset_settings_changed");
+ node->connect_compat("settings_changed", this, "_tileset_settings_changed");
_clear_bucket_cache();
}
@@ -1939,20 +1939,20 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
manual_button = memnew(CheckBox);
manual_button->set_text(TTR("Disable Autotile"));
- manual_button->connect("toggled", this, "_manual_toggled");
+ manual_button->connect_compat("toggled", this, "_manual_toggled");
add_child(manual_button);
priority_button = memnew(CheckBox);
priority_button->set_text(TTR("Enable Priority"));
- priority_button->connect("toggled", this, "_priority_toggled");
+ priority_button->connect_compat("toggled", this, "_priority_toggled");
add_child(priority_button);
search_box = memnew(LineEdit);
search_box->set_placeholder(TTR("Filter tiles"));
search_box->set_h_size_flags(SIZE_EXPAND_FILL);
- search_box->connect("text_entered", this, "_text_entered");
- search_box->connect("text_changed", this, "_text_changed");
- search_box->connect("gui_input", this, "_sbox_input");
+ search_box->connect_compat("text_entered", this, "_text_entered");
+ search_box->connect_compat("text_changed", this, "_text_changed");
+ search_box->connect_compat("gui_input", this, "_sbox_input");
add_child(search_box);
size_slider = memnew(HSlider);
@@ -1961,7 +1961,7 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
size_slider->set_max(4.0f);
size_slider->set_step(0.1f);
size_slider->set_value(1.0f);
- size_slider->connect("value_changed", this, "_icon_size_changed");
+ size_slider->connect_compat("value_changed", this, "_icon_size_changed");
add_child(size_slider);
int mw = EDITOR_DEF("editors/tile_map/palette_min_width", 80);
@@ -1980,8 +1980,8 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
palette->set_max_text_lines(2);
palette->set_select_mode(ItemList::SELECT_MULTI);
palette->add_constant_override("vseparation", 8 * EDSCALE);
- palette->connect("item_selected", this, "_palette_selected");
- palette->connect("multi_selected", this, "_palette_multi_selected");
+ palette->connect_compat("item_selected", this, "_palette_selected");
+ palette->connect_compat("multi_selected", this, "_palette_multi_selected");
palette_container->add_child(palette);
// Add message for when no texture is selected.
@@ -2015,25 +2015,25 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
paint_button = memnew(ToolButton);
paint_button->set_shortcut(ED_SHORTCUT("tile_map_editor/paint_tile", TTR("Paint Tile"), KEY_P));
paint_button->set_tooltip(TTR("Shift+LMB: Line Draw\nShift+Ctrl+LMB: Rectangle Paint"));
- paint_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_NONE));
+ paint_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_NONE));
paint_button->set_toggle_mode(true);
toolbar->add_child(paint_button);
bucket_fill_button = memnew(ToolButton);
bucket_fill_button->set_shortcut(ED_SHORTCUT("tile_map_editor/bucket_fill", TTR("Bucket Fill"), KEY_G));
- bucket_fill_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_BUCKET));
+ bucket_fill_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_BUCKET));
bucket_fill_button->set_toggle_mode(true);
toolbar->add_child(bucket_fill_button);
picker_button = memnew(ToolButton);
picker_button->set_shortcut(ED_SHORTCUT("tile_map_editor/pick_tile", TTR("Pick Tile"), KEY_I));
- picker_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_PICKING));
+ picker_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_PICKING));
picker_button->set_toggle_mode(true);
toolbar->add_child(picker_button);
select_button = memnew(ToolButton);
select_button->set_shortcut(ED_SHORTCUT("tile_map_editor/select", TTR("Select"), KEY_M));
- select_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_SELECTING));
+ select_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_SELECTING));
select_button->set_toggle_mode(true);
toolbar->add_child(select_button);
@@ -2068,40 +2068,40 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
p->add_shortcut(ED_GET_SHORTCUT("tile_map_editor/erase_selection"), OPTION_ERASE_SELECTION);
p->add_separator();
p->add_item(TTR("Fix Invalid Tiles"), OPTION_FIX_INVALID);
- p->connect("id_pressed", this, "_menu_option");
+ p->connect_compat("id_pressed", this, "_menu_option");
rotate_left_button = memnew(ToolButton);
rotate_left_button->set_tooltip(TTR("Rotate Left"));
rotate_left_button->set_focus_mode(FOCUS_NONE);
- rotate_left_button->connect("pressed", this, "_rotate", varray(-1));
+ rotate_left_button->connect_compat("pressed", this, "_rotate", varray(-1));
rotate_left_button->set_shortcut(ED_SHORTCUT("tile_map_editor/rotate_left", TTR("Rotate Left"), KEY_A));
tool_hb->add_child(rotate_left_button);
rotate_right_button = memnew(ToolButton);
rotate_right_button->set_tooltip(TTR("Rotate Right"));
rotate_right_button->set_focus_mode(FOCUS_NONE);
- rotate_right_button->connect("pressed", this, "_rotate", varray(1));
+ rotate_right_button->connect_compat("pressed", this, "_rotate", varray(1));
rotate_right_button->set_shortcut(ED_SHORTCUT("tile_map_editor/rotate_right", TTR("Rotate Right"), KEY_S));
tool_hb->add_child(rotate_right_button);
flip_horizontal_button = memnew(ToolButton);
flip_horizontal_button->set_tooltip(TTR("Flip Horizontally"));
flip_horizontal_button->set_focus_mode(FOCUS_NONE);
- flip_horizontal_button->connect("pressed", this, "_flip_horizontal");
+ flip_horizontal_button->connect_compat("pressed", this, "_flip_horizontal");
flip_horizontal_button->set_shortcut(ED_SHORTCUT("tile_map_editor/flip_horizontal", TTR("Flip Horizontally"), KEY_X));
tool_hb->add_child(flip_horizontal_button);
flip_vertical_button = memnew(ToolButton);
flip_vertical_button->set_tooltip(TTR("Flip Vertically"));
flip_vertical_button->set_focus_mode(FOCUS_NONE);
- flip_vertical_button->connect("pressed", this, "_flip_vertical");
+ flip_vertical_button->connect_compat("pressed", this, "_flip_vertical");
flip_vertical_button->set_shortcut(ED_SHORTCUT("tile_map_editor/flip_vertical", TTR("Flip Vertically"), KEY_Z));
tool_hb->add_child(flip_vertical_button);
clear_transform_button = memnew(ToolButton);
clear_transform_button->set_tooltip(TTR("Clear Transform"));
clear_transform_button->set_focus_mode(FOCUS_NONE);
- clear_transform_button->connect("pressed", this, "_clear_transform");
+ clear_transform_button->connect_compat("pressed", this, "_clear_transform");
clear_transform_button->set_shortcut(ED_SHORTCUT("tile_map_editor/clear_transform", TTR("Clear Transform"), KEY_W));
tool_hb->add_child(clear_transform_button);
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index 4fea504f7d..02c3709766 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -358,19 +358,19 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
left_container->add_child(texture_list);
texture_list->set_v_size_flags(SIZE_EXPAND_FILL);
texture_list->set_custom_minimum_size(Size2(200, 0));
- texture_list->connect("item_selected", this, "_on_texture_list_selected");
+ texture_list->connect_compat("item_selected", this, "_on_texture_list_selected");
texture_list->set_drag_forwarding(this);
HBoxContainer *tileset_toolbar_container = memnew(HBoxContainer);
left_container->add_child(tileset_toolbar_container);
tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE] = memnew(ToolButton);
- tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE]->connect("pressed", this, "_on_tileset_toolbar_button_pressed", varray(TOOL_TILESET_ADD_TEXTURE));
+ tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE]->connect_compat("pressed", this, "_on_tileset_toolbar_button_pressed", varray(TOOL_TILESET_ADD_TEXTURE));
tileset_toolbar_container->add_child(tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE]);
tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE]->set_tooltip(TTR("Add Texture(s) to TileSet."));
tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE] = memnew(ToolButton);
- tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE]->connect("pressed", this, "_on_tileset_toolbar_button_pressed", varray(TOOL_TILESET_REMOVE_TEXTURE));
+ tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE]->connect_compat("pressed", this, "_on_tileset_toolbar_button_pressed", varray(TOOL_TILESET_REMOVE_TEXTURE));
tileset_toolbar_container->add_child(tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE]);
tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE]->set_tooltip(TTR("Remove selected Texture from TileSet."));
@@ -383,7 +383,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
tileset_toolbar_tools->get_popup()->add_item(TTR("Create from Scene"), TOOL_TILESET_CREATE_SCENE);
tileset_toolbar_tools->get_popup()->add_item(TTR("Merge from Scene"), TOOL_TILESET_MERGE_SCENE);
- tileset_toolbar_tools->get_popup()->connect("id_pressed", this, "_on_tileset_toolbar_button_pressed");
+ tileset_toolbar_tools->get_popup()->connect_compat("id_pressed", this, "_on_tileset_toolbar_button_pressed");
tileset_toolbar_container->add_child(tileset_toolbar_tools);
//---------------
@@ -416,7 +416,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
tool_workspacemode[i]->set_text(workspace_label[i]);
tool_workspacemode[i]->set_toggle_mode(true);
tool_workspacemode[i]->set_button_group(g);
- tool_workspacemode[i]->connect("pressed", this, "_on_workspace_mode_changed", varray(i));
+ tool_workspacemode[i]->connect_compat("pressed", this, "_on_workspace_mode_changed", varray(i));
tool_hb->add_child(tool_workspacemode[i]);
}
@@ -429,14 +429,14 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
tool_hb->add_child(tools[SELECT_NEXT]);
tool_hb->move_child(tools[SELECT_NEXT], WORKSPACE_CREATE_SINGLE);
tools[SELECT_NEXT]->set_shortcut(ED_SHORTCUT("tileset_editor/next_shape", TTR("Next Coordinate"), KEY_PAGEDOWN));
- tools[SELECT_NEXT]->connect("pressed", this, "_on_tool_clicked", varray(SELECT_NEXT));
+ tools[SELECT_NEXT]->connect_compat("pressed", this, "_on_tool_clicked", varray(SELECT_NEXT));
tools[SELECT_NEXT]->set_tooltip(TTR("Select the next shape, subtile, or Tile."));
tools[SELECT_PREVIOUS] = memnew(ToolButton);
tool_hb->add_child(tools[SELECT_PREVIOUS]);
tool_hb->move_child(tools[SELECT_PREVIOUS], WORKSPACE_CREATE_SINGLE);
tools[SELECT_PREVIOUS]->set_shortcut(ED_SHORTCUT("tileset_editor/previous_shape", TTR("Previous Coordinate"), KEY_PAGEUP));
tools[SELECT_PREVIOUS]->set_tooltip(TTR("Select the previous shape, subtile, or Tile."));
- tools[SELECT_PREVIOUS]->connect("pressed", this, "_on_tool_clicked", varray(SELECT_PREVIOUS));
+ tools[SELECT_PREVIOUS]->connect_compat("pressed", this, "_on_tool_clicked", varray(SELECT_PREVIOUS));
VSeparator *separator_shape_selection = memnew(VSeparator);
tool_hb->add_child(separator_shape_selection);
@@ -466,7 +466,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
tool_editmode[i]->set_text(label[i]);
tool_editmode[i]->set_toggle_mode(true);
tool_editmode[i]->set_button_group(g);
- tool_editmode[i]->connect("pressed", this, "_on_edit_mode_changed", varray(i));
+ tool_editmode[i]->connect_compat("pressed", this, "_on_edit_mode_changed", varray(i));
tool_hb->add_child(tool_editmode[i]);
}
tool_editmode[EDITMODE_COLLISION]->set_pressed(true);
@@ -493,21 +493,21 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
tools[TOOL_SELECT]->set_toggle_mode(true);
tools[TOOL_SELECT]->set_button_group(tg);
tools[TOOL_SELECT]->set_pressed(true);
- tools[TOOL_SELECT]->connect("pressed", this, "_on_tool_clicked", varray(TOOL_SELECT));
+ tools[TOOL_SELECT]->connect_compat("pressed", this, "_on_tool_clicked", varray(TOOL_SELECT));
separator_bitmask = memnew(VSeparator);
toolbar->add_child(separator_bitmask);
tools[BITMASK_COPY] = memnew(ToolButton);
tools[BITMASK_COPY]->set_tooltip(TTR("Copy bitmask."));
- tools[BITMASK_COPY]->connect("pressed", this, "_on_tool_clicked", varray(BITMASK_COPY));
+ tools[BITMASK_COPY]->connect_compat("pressed", this, "_on_tool_clicked", varray(BITMASK_COPY));
toolbar->add_child(tools[BITMASK_COPY]);
tools[BITMASK_PASTE] = memnew(ToolButton);
tools[BITMASK_PASTE]->set_tooltip(TTR("Paste bitmask."));
- tools[BITMASK_PASTE]->connect("pressed", this, "_on_tool_clicked", varray(BITMASK_PASTE));
+ tools[BITMASK_PASTE]->connect_compat("pressed", this, "_on_tool_clicked", varray(BITMASK_PASTE));
toolbar->add_child(tools[BITMASK_PASTE]);
tools[BITMASK_CLEAR] = memnew(ToolButton);
tools[BITMASK_CLEAR]->set_tooltip(TTR("Erase bitmask."));
- tools[BITMASK_CLEAR]->connect("pressed", this, "_on_tool_clicked", varray(BITMASK_CLEAR));
+ tools[BITMASK_CLEAR]->connect_compat("pressed", this, "_on_tool_clicked", varray(BITMASK_CLEAR));
toolbar->add_child(tools[BITMASK_CLEAR]);
tools[SHAPE_NEW_RECTANGLE] = memnew(ToolButton);
@@ -525,13 +525,13 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
separator_shape_toggle = memnew(VSeparator);
toolbar->add_child(separator_shape_toggle);
tools[SHAPE_TOGGLE_TYPE] = memnew(ToolButton);
- tools[SHAPE_TOGGLE_TYPE]->connect("pressed", this, "_on_tool_clicked", varray(SHAPE_TOGGLE_TYPE));
+ tools[SHAPE_TOGGLE_TYPE]->connect_compat("pressed", this, "_on_tool_clicked", varray(SHAPE_TOGGLE_TYPE));
toolbar->add_child(tools[SHAPE_TOGGLE_TYPE]);
separator_delete = memnew(VSeparator);
toolbar->add_child(separator_delete);
tools[SHAPE_DELETE] = memnew(ToolButton);
- tools[SHAPE_DELETE]->connect("pressed", this, "_on_tool_clicked", varray(SHAPE_DELETE));
+ tools[SHAPE_DELETE]->connect_compat("pressed", this, "_on_tool_clicked", varray(SHAPE_DELETE));
toolbar->add_child(tools[SHAPE_DELETE]);
spin_priority = memnew(SpinBox);
@@ -539,7 +539,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
spin_priority->set_max(255);
spin_priority->set_step(1);
spin_priority->set_custom_minimum_size(Size2(100, 0));
- spin_priority->connect("value_changed", this, "_on_priority_changed");
+ spin_priority->connect_compat("value_changed", this, "_on_priority_changed");
spin_priority->hide();
toolbar->add_child(spin_priority);
@@ -548,7 +548,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
spin_z_index->set_max(VS::CANVAS_ITEM_Z_MAX);
spin_z_index->set_step(1);
spin_z_index->set_custom_minimum_size(Size2(100, 0));
- spin_z_index->connect("value_changed", this, "_on_z_index_changed");
+ spin_z_index->connect_compat("value_changed", this, "_on_z_index_changed");
spin_z_index->hide();
toolbar->add_child(spin_z_index);
@@ -562,7 +562,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
tools[TOOL_GRID_SNAP] = memnew(ToolButton);
tools[TOOL_GRID_SNAP]->set_toggle_mode(true);
tools[TOOL_GRID_SNAP]->set_tooltip(TTR("Enable snap and show grid (configurable via the Inspector)."));
- tools[TOOL_GRID_SNAP]->connect("toggled", this, "_on_grid_snap_toggled");
+ tools[TOOL_GRID_SNAP]->connect_compat("toggled", this, "_on_grid_snap_toggled");
toolbar->add_child(tools[TOOL_GRID_SNAP]);
Control *separator = memnew(Control);
@@ -570,15 +570,15 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
toolbar->add_child(separator);
tools[ZOOM_OUT] = memnew(ToolButton);
- tools[ZOOM_OUT]->connect("pressed", this, "_zoom_out");
+ tools[ZOOM_OUT]->connect_compat("pressed", this, "_zoom_out");
toolbar->add_child(tools[ZOOM_OUT]);
tools[ZOOM_OUT]->set_tooltip(TTR("Zoom Out"));
tools[ZOOM_1] = memnew(ToolButton);
- tools[ZOOM_1]->connect("pressed", this, "_zoom_reset");
+ tools[ZOOM_1]->connect_compat("pressed", this, "_zoom_reset");
toolbar->add_child(tools[ZOOM_1]);
tools[ZOOM_1]->set_tooltip(TTR("Zoom Reset"));
tools[ZOOM_IN] = memnew(ToolButton);
- tools[ZOOM_IN]->connect("pressed", this, "_zoom_in");
+ tools[ZOOM_IN]->connect_compat("pressed", this, "_zoom_in");
toolbar->add_child(tools[ZOOM_IN]);
tools[ZOOM_IN]->set_tooltip(TTR("Zoom In"));
@@ -607,13 +607,13 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
scroll->add_child(workspace_container);
workspace_overlay = memnew(Control);
- workspace_overlay->connect("draw", this, "_on_workspace_overlay_draw");
+ workspace_overlay->connect_compat("draw", this, "_on_workspace_overlay_draw");
workspace_container->add_child(workspace_overlay);
workspace = memnew(Control);
workspace->set_focus_mode(FOCUS_ALL);
- workspace->connect("draw", this, "_on_workspace_draw");
- workspace->connect("gui_input", this, "_on_workspace_input");
+ workspace->connect_compat("draw", this, "_on_workspace_draw");
+ workspace->connect_compat("gui_input", this, "_on_workspace_input");
workspace->set_draw_behind_parent(true);
workspace_overlay->add_child(workspace);
@@ -626,7 +626,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
//---------------
cd = memnew(ConfirmationDialog);
add_child(cd);
- cd->connect("confirmed", this, "_on_tileset_toolbar_confirm");
+ cd->connect_compat("confirmed", this, "_on_tileset_toolbar_confirm");
//---------------
err_dialog = memnew(AcceptDialog);
@@ -645,7 +645,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
texture_dialog->add_filter("*." + E->get() + " ; " + E->get().to_upper());
}
add_child(texture_dialog);
- texture_dialog->connect("files_selected", this, "_on_textures_added");
+ texture_dialog->connect_compat("files_selected", this, "_on_textures_added");
//---------------
helper = memnew(TilesetEditorContext(this));
@@ -3548,11 +3548,11 @@ void TileSetEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
tileset_editor_button->show();
editor->make_bottom_panel_item_visible(tileset_editor);
- get_tree()->connect("idle_frame", tileset_editor, "_on_workspace_process");
+ get_tree()->connect_compat("idle_frame", tileset_editor, "_on_workspace_process");
} else {
editor->hide_bottom_panel();
tileset_editor_button->hide();
- get_tree()->disconnect("idle_frame", tileset_editor, "_on_workspace_process");
+ get_tree()->disconnect_compat("idle_frame", tileset_editor, "_on_workspace_process");
}
}
diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp
index e17e6a9d16..cfa10488ab 100644
--- a/editor/plugins/version_control_editor_plugin.cpp
+++ b/editor/plugins/version_control_editor_plugin.cpp
@@ -127,7 +127,7 @@ void VersionControlEditorPlugin::_initialize_vcs() {
vcs_interface->set_script_and_instance(script, addon_script_instance);
EditorVCSInterface::set_singleton(vcs_interface);
- EditorFileSystem::get_singleton()->connect("filesystem_changed", this, "_refresh_stage_area");
+ EditorFileSystem::get_singleton()->connect_compat("filesystem_changed", this, "_refresh_stage_area");
String res_dir = OS::get_singleton()->get_resource_dir();
@@ -388,8 +388,8 @@ void VersionControlEditorPlugin::clear_stage_area() {
void VersionControlEditorPlugin::shut_down() {
if (EditorVCSInterface::get_singleton()) {
- if (EditorFileSystem::get_singleton()->is_connected("filesystem_changed", this, "_refresh_stage_area")) {
- EditorFileSystem::get_singleton()->disconnect("filesystem_changed", this, "_refresh_stage_area");
+ if (EditorFileSystem::get_singleton()->is_connected_compat("filesystem_changed", this, "_refresh_stage_area")) {
+ EditorFileSystem::get_singleton()->disconnect_compat("filesystem_changed", this, "_refresh_stage_area");
}
EditorVCSInterface::get_singleton()->shut_down();
memdelete(EditorVCSInterface::get_singleton());
@@ -444,14 +444,14 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
set_up_choice = memnew(OptionButton);
set_up_choice->set_h_size_flags(HBoxContainer::SIZE_EXPAND_FILL);
- set_up_choice->connect("item_selected", this, "_selected_a_vcs");
+ set_up_choice->connect_compat("item_selected", this, "_selected_a_vcs");
set_up_hbc->add_child(set_up_choice);
set_up_init_settings = NULL;
set_up_init_button = memnew(Button);
set_up_init_button->set_text(TTR("Initialize"));
- set_up_init_button->connect("pressed", this, "_initialize_vcs");
+ set_up_init_button->connect_compat("pressed", this, "_initialize_vcs");
set_up_vbc->add_child(set_up_init_button);
version_control_actions->set_v_size_flags(PopupMenu::SIZE_EXPAND_FILL);
@@ -479,7 +479,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
refresh_button->set_tooltip(TTR("Detect new changes"));
refresh_button->set_text(TTR("Refresh"));
refresh_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Reload", "EditorIcons"));
- refresh_button->connect("pressed", this, "_refresh_stage_area");
+ refresh_button->connect_compat("pressed", this, "_refresh_stage_area");
stage_tools->add_child(refresh_button);
stage_files = memnew(Tree);
@@ -492,7 +492,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
stage_files->set_allow_rmb_select(true);
stage_files->set_select_mode(Tree::SelectMode::SELECT_MULTI);
stage_files->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true);
- stage_files->connect("cell_selected", this, "_view_file_diff");
+ stage_files->connect_compat("cell_selected", this, "_view_file_diff");
stage_files->create_item();
stage_files->set_hide_root(true);
commit_box_vbc->add_child(stage_files);
@@ -516,12 +516,12 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
stage_selected_button = memnew(Button);
stage_selected_button->set_h_size_flags(Button::SIZE_EXPAND_FILL);
stage_selected_button->set_text(TTR("Stage Selected"));
- stage_selected_button->connect("pressed", this, "_stage_selected");
+ stage_selected_button->connect_compat("pressed", this, "_stage_selected");
stage_buttons->add_child(stage_selected_button);
stage_all_button = memnew(Button);
stage_all_button->set_text(TTR("Stage All"));
- stage_all_button->connect("pressed", this, "_stage_all");
+ stage_all_button->connect_compat("pressed", this, "_stage_all");
stage_buttons->add_child(stage_all_button);
commit_box_vbc->add_child(memnew(HSeparator));
@@ -537,7 +537,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
commit_button = memnew(Button);
commit_button->set_text(TTR("Commit Changes"));
- commit_button->connect("pressed", this, "_send_commit_msg");
+ commit_button->connect_compat("pressed", this, "_send_commit_msg");
commit_box_vbc->add_child(commit_button);
commit_status = memnew(Label);
@@ -571,7 +571,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
diff_refresh_button = memnew(Button);
diff_refresh_button->set_tooltip(TTR("Detect changes in file diff"));
diff_refresh_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Reload", "EditorIcons"));
- diff_refresh_button->connect("pressed", this, "_refresh_file_diff");
+ diff_refresh_button->connect_compat("pressed", this, "_refresh_file_diff");
diff_hbc->add_child(diff_refresh_button);
diff = memnew(RichTextLabel);
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 6c8c1b44dc..826af88571 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -72,14 +72,14 @@ void VisualShaderEditor::edit(VisualShader *p_visual_shader) {
}
}
visual_shader = Ref<VisualShader>(p_visual_shader);
- if (!visual_shader->is_connected("changed", this, "_update_preview")) {
- visual_shader->connect("changed", this, "_update_preview");
+ if (!visual_shader->is_connected_compat("changed", this, "_update_preview")) {
+ visual_shader->connect_compat("changed", this, "_update_preview");
}
visual_shader->set_graph_offset(graph->get_scroll_ofs() / EDSCALE);
} else {
if (visual_shader.is_valid()) {
- if (visual_shader->is_connected("changed", this, "")) {
- visual_shader->disconnect("changed", this, "_update_preview");
+ if (visual_shader->is_connected_compat("changed", this, "")) {
+ visual_shader->disconnect_compat("changed", this, "_update_preview");
}
}
visual_shader.unref();
@@ -529,7 +529,7 @@ void VisualShaderEditor::_update_graph() {
size = group_node->get_size();
node->set_resizable(true);
- node->connect("resize_request", this, "_node_resized", varray((int)type, nodes[n_i]));
+ node->connect_compat("resize_request", this, "_node_resized", varray((int)type, nodes[n_i]));
}
if (is_expression) {
expression = expression_node->get_expression();
@@ -546,10 +546,10 @@ void VisualShaderEditor::_update_graph() {
if (nodes[n_i] >= 2) {
node->set_show_close_button(true);
- node->connect("close_request", this, "_delete_request", varray(nodes[n_i]), CONNECT_DEFERRED);
+ node->connect_compat("close_request", this, "_delete_request", varray(nodes[n_i]), CONNECT_DEFERRED);
}
- node->connect("dragged", this, "_node_dragged", varray(nodes[n_i]));
+ node->connect_compat("dragged", this, "_node_dragged", varray(nodes[n_i]));
Control *custom_editor = NULL;
int port_offset = 0;
@@ -567,8 +567,8 @@ void VisualShaderEditor::_update_graph() {
LineEdit *uniform_name = memnew(LineEdit);
uniform_name->set_text(uniform->get_uniform_name());
node->add_child(uniform_name);
- uniform_name->connect("text_entered", this, "_line_edit_changed", varray(uniform_name, nodes[n_i]));
- uniform_name->connect("focus_exited", this, "_line_edit_focus_out", varray(uniform_name, nodes[n_i]));
+ uniform_name->connect_compat("text_entered", this, "_line_edit_changed", varray(uniform_name, nodes[n_i]));
+ uniform_name->connect_compat("focus_exited", this, "_line_edit_focus_out", varray(uniform_name, nodes[n_i]));
if (vsnode->get_input_port_count() == 0 && vsnode->get_output_port_count() == 1 && vsnode->get_output_port_name(0) == "") {
//shortcut
@@ -612,14 +612,14 @@ void VisualShaderEditor::_update_graph() {
Button *add_input_btn = memnew(Button);
add_input_btn->set_text(TTR("Add Input"));
- add_input_btn->connect("pressed", this, "_add_input_port", varray(nodes[n_i], group_node->get_free_input_port_id(), VisualShaderNode::PORT_TYPE_VECTOR, "input" + itos(group_node->get_free_input_port_id())), CONNECT_DEFERRED);
+ add_input_btn->connect_compat("pressed", this, "_add_input_port", varray(nodes[n_i], group_node->get_free_input_port_id(), VisualShaderNode::PORT_TYPE_VECTOR, "input" + itos(group_node->get_free_input_port_id())), CONNECT_DEFERRED);
hb2->add_child(add_input_btn);
hb2->add_spacer();
Button *add_output_btn = memnew(Button);
add_output_btn->set_text(TTR("Add Output"));
- add_output_btn->connect("pressed", this, "_add_output_port", varray(nodes[n_i], group_node->get_free_output_port_id(), VisualShaderNode::PORT_TYPE_VECTOR, "output" + itos(group_node->get_free_output_port_id())), CONNECT_DEFERRED);
+ add_output_btn->connect_compat("pressed", this, "_add_output_port", varray(nodes[n_i], group_node->get_free_output_port_id(), VisualShaderNode::PORT_TYPE_VECTOR, "output" + itos(group_node->get_free_output_port_id())), CONNECT_DEFERRED);
hb2->add_child(add_output_btn);
node->add_child(hb2);
@@ -667,13 +667,13 @@ void VisualShaderEditor::_update_graph() {
if (default_value.get_type() != Variant::NIL) { // only a label
Button *button = memnew(Button);
hb->add_child(button);
- button->connect("pressed", this, "_edit_port_default_input", varray(button, nodes[n_i], i));
+ button->connect_compat("pressed", this, "_edit_port_default_input", varray(button, nodes[n_i], i));
switch (default_value.get_type()) {
case Variant::COLOR: {
button->set_custom_minimum_size(Size2(30, 0) * EDSCALE);
- button->connect("draw", this, "_draw_color_over_button", varray(button, default_value));
+ button->connect_compat("draw", this, "_draw_color_over_button", varray(button, default_value));
} break;
case Variant::BOOL: {
button->set_text(((bool)default_value) ? "true" : "false");
@@ -708,20 +708,20 @@ void VisualShaderEditor::_update_graph() {
type_box->add_item(TTR("Sampler"));
type_box->select(group_node->get_input_port_type(i));
type_box->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
- type_box->connect("item_selected", this, "_change_input_port_type", varray(nodes[n_i], i), CONNECT_DEFERRED);
+ type_box->connect_compat("item_selected", this, "_change_input_port_type", varray(nodes[n_i], i), CONNECT_DEFERRED);
LineEdit *name_box = memnew(LineEdit);
hb->add_child(name_box);
name_box->set_custom_minimum_size(Size2(65 * EDSCALE, 0));
name_box->set_h_size_flags(SIZE_EXPAND_FILL);
name_box->set_text(name_left);
- name_box->connect("text_entered", this, "_change_input_port_name", varray(name_box, nodes[n_i], i));
- name_box->connect("focus_exited", this, "_port_name_focus_out", varray(name_box, nodes[n_i], i, false));
+ name_box->connect_compat("text_entered", this, "_change_input_port_name", varray(name_box, nodes[n_i], i));
+ name_box->connect_compat("focus_exited", this, "_port_name_focus_out", varray(name_box, nodes[n_i], i, false));
Button *remove_btn = memnew(Button);
remove_btn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Remove", "EditorIcons"));
remove_btn->set_tooltip(TTR("Remove") + " " + name_left);
- remove_btn->connect("pressed", this, "_remove_input_port", varray(nodes[n_i], i), CONNECT_DEFERRED);
+ remove_btn->connect_compat("pressed", this, "_remove_input_port", varray(nodes[n_i], i), CONNECT_DEFERRED);
hb->add_child(remove_btn);
} else {
@@ -750,7 +750,7 @@ void VisualShaderEditor::_update_graph() {
Button *remove_btn = memnew(Button);
remove_btn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Remove", "EditorIcons"));
remove_btn->set_tooltip(TTR("Remove") + " " + name_left);
- remove_btn->connect("pressed", this, "_remove_output_port", varray(nodes[n_i], i), CONNECT_DEFERRED);
+ remove_btn->connect_compat("pressed", this, "_remove_output_port", varray(nodes[n_i], i), CONNECT_DEFERRED);
hb->add_child(remove_btn);
LineEdit *name_box = memnew(LineEdit);
@@ -758,8 +758,8 @@ void VisualShaderEditor::_update_graph() {
name_box->set_custom_minimum_size(Size2(65 * EDSCALE, 0));
name_box->set_h_size_flags(SIZE_EXPAND_FILL);
name_box->set_text(name_right);
- name_box->connect("text_entered", this, "_change_output_port_name", varray(name_box, nodes[n_i], i));
- name_box->connect("focus_exited", this, "_port_name_focus_out", varray(name_box, nodes[n_i], i, true));
+ name_box->connect_compat("text_entered", this, "_change_output_port_name", varray(name_box, nodes[n_i], i));
+ name_box->connect_compat("focus_exited", this, "_port_name_focus_out", varray(name_box, nodes[n_i], i, true));
OptionButton *type_box = memnew(OptionButton);
hb->add_child(type_box);
@@ -769,7 +769,7 @@ void VisualShaderEditor::_update_graph() {
type_box->add_item(TTR("Transform"));
type_box->select(group_node->get_output_port_type(i));
type_box->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
- type_box->connect("item_selected", this, "_change_output_port_type", varray(nodes[n_i], i), CONNECT_DEFERRED);
+ type_box->connect_compat("item_selected", this, "_change_output_port_type", varray(nodes[n_i], i), CONNECT_DEFERRED);
} else {
Label *label = memnew(Label);
label->set_text(name_right);
@@ -790,7 +790,7 @@ void VisualShaderEditor::_update_graph() {
preview->set_pressed(true);
}
- preview->connect("pressed", this, "_preview_select_port", varray(nodes[n_i], i), CONNECT_DEFERRED);
+ preview->connect_compat("pressed", this, "_preview_select_port", varray(nodes[n_i], i), CONNECT_DEFERRED);
hb->add_child(preview);
}
@@ -863,7 +863,7 @@ void VisualShaderEditor::_update_graph() {
expression_box->set_context_menu_enabled(false);
expression_box->set_show_line_numbers(true);
- expression_box->connect("focus_exited", this, "_expression_focus_out", varray(expression_box, nodes[n_i]));
+ expression_box->connect_compat("focus_exited", this, "_expression_focus_out", varray(expression_box, nodes[n_i]));
}
if (!uniform.is_valid()) {
@@ -2327,17 +2327,17 @@ VisualShaderEditor::VisualShaderEditor() {
graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_SAMPLER);
//graph->add_valid_left_disconnect_type(0);
graph->set_v_size_flags(SIZE_EXPAND_FILL);
- graph->connect("connection_request", this, "_connection_request", varray(), CONNECT_DEFERRED);
- graph->connect("disconnection_request", this, "_disconnection_request", varray(), CONNECT_DEFERRED);
- graph->connect("node_selected", this, "_node_selected");
- graph->connect("scroll_offset_changed", this, "_scroll_changed");
- graph->connect("duplicate_nodes_request", this, "_duplicate_nodes");
- graph->connect("copy_nodes_request", this, "_copy_nodes");
- graph->connect("paste_nodes_request", this, "_paste_nodes");
- graph->connect("delete_nodes_request", this, "_on_nodes_delete");
- graph->connect("gui_input", this, "_graph_gui_input");
- graph->connect("connection_to_empty", this, "_connection_to_empty");
- graph->connect("connection_from_empty", this, "_connection_from_empty");
+ graph->connect_compat("connection_request", this, "_connection_request", varray(), CONNECT_DEFERRED);
+ graph->connect_compat("disconnection_request", this, "_disconnection_request", varray(), CONNECT_DEFERRED);
+ graph->connect_compat("node_selected", this, "_node_selected");
+ graph->connect_compat("scroll_offset_changed", this, "_scroll_changed");
+ graph->connect_compat("duplicate_nodes_request", this, "_duplicate_nodes");
+ graph->connect_compat("copy_nodes_request", this, "_copy_nodes");
+ graph->connect_compat("paste_nodes_request", this, "_paste_nodes");
+ graph->connect_compat("delete_nodes_request", this, "_on_nodes_delete");
+ graph->connect_compat("gui_input", this, "_graph_gui_input");
+ graph->connect_compat("connection_to_empty", this, "_connection_to_empty");
+ graph->connect_compat("connection_from_empty", this, "_connection_from_empty");
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_SCALAR);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_VECTOR);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_BOOLEAN);
@@ -2359,7 +2359,7 @@ VisualShaderEditor::VisualShaderEditor() {
edit_type->add_item(TTR("Fragment"));
edit_type->add_item(TTR("Light"));
edit_type->select(1);
- edit_type->connect("item_selected", this, "_mode_selected");
+ edit_type->connect_compat("item_selected", this, "_mode_selected");
graph->get_zoom_hbox()->add_child(edit_type);
graph->get_zoom_hbox()->move_child(edit_type, 0);
@@ -2367,13 +2367,13 @@ VisualShaderEditor::VisualShaderEditor() {
graph->get_zoom_hbox()->add_child(add_node);
add_node->set_text(TTR("Add Node..."));
graph->get_zoom_hbox()->move_child(add_node, 0);
- add_node->connect("pressed", this, "_show_members_dialog", varray(false));
+ add_node->connect_compat("pressed", this, "_show_members_dialog", varray(false));
preview_shader = memnew(ToolButton);
preview_shader->set_toggle_mode(true);
preview_shader->set_tooltip(TTR("Show resulted shader code."));
graph->get_zoom_hbox()->add_child(preview_shader);
- preview_shader->connect("pressed", this, "_show_preview_text");
+ preview_shader->connect_compat("pressed", this, "_show_preview_text");
///////////////////////////////////////
// PREVIEW PANEL
@@ -2407,15 +2407,15 @@ VisualShaderEditor::VisualShaderEditor() {
node_filter = memnew(LineEdit);
filter_hb->add_child(node_filter);
- node_filter->connect("text_changed", this, "_member_filter_changed");
- node_filter->connect("gui_input", this, "_sbox_input");
+ node_filter->connect_compat("text_changed", this, "_member_filter_changed");
+ node_filter->connect_compat("gui_input", this, "_sbox_input");
node_filter->set_h_size_flags(SIZE_EXPAND_FILL);
node_filter->set_placeholder(TTR("Search"));
tools = memnew(MenuButton);
filter_hb->add_child(tools);
tools->set_tooltip(TTR("Options"));
- tools->get_popup()->connect("id_pressed", this, "_tools_menu_option");
+ tools->get_popup()->connect_compat("id_pressed", this, "_tools_menu_option");
tools->get_popup()->add_item(TTR("Expand All"), EXPAND_ALL);
tools->get_popup()->add_item(TTR("Collapse All"), COLLAPSE_ALL);
@@ -2428,9 +2428,9 @@ VisualShaderEditor::VisualShaderEditor() {
members->set_allow_reselect(true);
members->set_hide_folding(false);
members->set_custom_minimum_size(Size2(180 * EDSCALE, 200 * EDSCALE));
- members->connect("item_activated", this, "_member_create");
- members->connect("item_selected", this, "_member_selected");
- members->connect("nothing_selected", this, "_member_unselected");
+ members->connect_compat("item_activated", this, "_member_create");
+ members->connect_compat("item_selected", this, "_member_selected");
+ members->connect_compat("nothing_selected", this, "_member_unselected");
HBoxContainer *desc_hbox = memnew(HBoxContainer);
members_vb->add_child(desc_hbox);
@@ -2458,11 +2458,11 @@ VisualShaderEditor::VisualShaderEditor() {
members_dialog->set_title(TTR("Create Shader Node"));
members_dialog->add_child(members_vb);
members_dialog->get_ok()->set_text(TTR("Create"));
- members_dialog->get_ok()->connect("pressed", this, "_member_create");
+ members_dialog->get_ok()->connect_compat("pressed", this, "_member_create");
members_dialog->get_ok()->set_disabled(true);
members_dialog->set_resizable(true);
members_dialog->set_as_minsize();
- members_dialog->connect("hide", this, "_member_cancel");
+ members_dialog->connect_compat("hide", this, "_member_cancel");
add_child(members_dialog);
alert = memnew(AcceptDialog);
@@ -2841,7 +2841,7 @@ VisualShaderEditor::VisualShaderEditor() {
property_editor = memnew(CustomPropertyEditor);
add_child(property_editor);
- property_editor->connect("variant_changed", this, "_port_edited");
+ property_editor->connect_compat("variant_changed", this, "_port_edited");
}
void VisualShaderEditorPlugin::edit(Object *p_object) {
@@ -2902,7 +2902,7 @@ protected:
public:
void _notification(int p_what) {
if (p_what == NOTIFICATION_READY) {
- connect("item_selected", this, "_item_selected");
+ connect_compat("item_selected", this, "_item_selected");
}
}
@@ -3031,16 +3031,16 @@ public:
bool res_prop = Object::cast_to<EditorPropertyResource>(p_properties[i]);
if (res_prop) {
- p_properties[i]->connect("resource_selected", this, "_resource_selected");
+ p_properties[i]->connect_compat("resource_selected", this, "_resource_selected");
}
- properties[i]->connect("property_changed", this, "_property_changed");
+ properties[i]->connect_compat("property_changed", this, "_property_changed");
properties[i]->set_object_and_property(node.ptr(), p_names[i]);
properties[i]->update_property();
properties[i]->set_name_split_ratio(0);
}
- node->connect("changed", this, "_node_changed");
- node->connect("editor_refresh_request", this, "_refresh_request", varray(), CONNECT_DEFERRED);
+ node->connect_compat("changed", this, "_node_changed");
+ node->connect_compat("editor_refresh_request", this, "_refresh_request", varray(), CONNECT_DEFERRED);
}
static void _bind_methods() {
@@ -3206,7 +3206,7 @@ EditorPropertyShaderMode::EditorPropertyShaderMode() {
options->set_clip_text(true);
add_child(options);
add_focusable(options);
- options->connect("item_selected", this, "_option_selected");
+ options->connect_compat("item_selected", this, "_option_selected");
}
bool EditorInspectorShaderModePlugin::can_handle(Object *p_object) {
@@ -3279,7 +3279,7 @@ void VisualShaderNodePortPreview::_shader_changed() {
void VisualShaderNodePortPreview::setup(const Ref<VisualShader> &p_shader, VisualShader::Type p_type, int p_node, int p_port) {
shader = p_shader;
- shader->connect("changed", this, "_shader_changed");
+ shader->connect_compat("changed", this, "_shader_changed");
type = p_type;
port = p_port;
node = p_node;