summaryrefslogtreecommitdiff
path: root/editor/inspector_dock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/inspector_dock.cpp')
-rw-r--r--editor/inspector_dock.cpp37
1 files changed, 13 insertions, 24 deletions
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
index 1f96092bba..6b8cb49412 100644
--- a/editor/inspector_dock.cpp
+++ b/editor/inspector_dock.cpp
@@ -343,27 +343,16 @@ void InspectorDock::_notification(int p_what) {
}
void InspectorDock::_bind_methods() {
- ClassDB::bind_method("_menu_option", &InspectorDock::_menu_option);
ClassDB::bind_method("update_keying", &InspectorDock::update_keying);
- ClassDB::bind_method("_property_keyed", &InspectorDock::_property_keyed);
- ClassDB::bind_method("_transform_keyed", &InspectorDock::_transform_keyed);
+ ClassDB::bind_method("_transform_keyed", &InspectorDock::_transform_keyed); // Still used by some connect_compat.
- ClassDB::bind_method("_resource_file_selected", &InspectorDock::_resource_file_selected);
- ClassDB::bind_method("_open_resource_selector", &InspectorDock::_open_resource_selector);
ClassDB::bind_method("_unref_resource", &InspectorDock::_unref_resource);
ClassDB::bind_method("_paste_resource", &InspectorDock::_paste_resource);
ClassDB::bind_method("_copy_resource", &InspectorDock::_copy_resource);
- ClassDB::bind_method("_select_history", &InspectorDock::_select_history);
- ClassDB::bind_method("_prepare_history", &InspectorDock::_prepare_history);
- ClassDB::bind_method("_resource_created", &InspectorDock::_resource_created);
- ClassDB::bind_method("_resource_selected", &InspectorDock::_resource_selected, DEFVAL(""));
ClassDB::bind_method("_menu_collapseall", &InspectorDock::_menu_collapseall);
ClassDB::bind_method("_menu_expandall", &InspectorDock::_menu_expandall);
- ClassDB::bind_method("_warning_pressed", &InspectorDock::_warning_pressed);
- ClassDB::bind_method("_edit_forward", &InspectorDock::_edit_forward);
- ClassDB::bind_method("_edit_back", &InspectorDock::_edit_back);
ADD_SIGNAL(MethodInfo("request_help"));
}
@@ -517,7 +506,7 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) {
resource_load_button->set_tooltip(TTR("Load an existing resource from disk and edit it."));
resource_load_button->set_icon(get_icon("Load", "EditorIcons"));
general_options_hb->add_child(resource_load_button);
- resource_load_button->connect_compat("pressed", this, "_open_resource_selector");
+ resource_load_button->connect("pressed", callable_mp(this, &InspectorDock::_open_resource_selector));
resource_load_button->set_focus_mode(Control::FOCUS_NONE);
resource_save_button = memnew(MenuButton);
@@ -526,7 +515,7 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) {
general_options_hb->add_child(resource_save_button);
resource_save_button->get_popup()->add_item(TTR("Save"), RESOURCE_SAVE);
resource_save_button->get_popup()->add_item(TTR("Save As..."), RESOURCE_SAVE_AS);
- resource_save_button->get_popup()->connect_compat("id_pressed", this, "_menu_option");
+ resource_save_button->get_popup()->connect("id_pressed", callable_mp(this, &InspectorDock::_menu_option));
resource_save_button->set_focus_mode(Control::FOCUS_NONE);
resource_save_button->set_disabled(true);
@@ -538,7 +527,7 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) {
backward_button->set_flat(true);
backward_button->set_tooltip(TTR("Go to the previous edited object in history."));
backward_button->set_disabled(true);
- backward_button->connect_compat("pressed", this, "_edit_back");
+ backward_button->connect("pressed", callable_mp(this, &InspectorDock::_edit_back));
forward_button = memnew(ToolButton);
general_options_hb->add_child(forward_button);
@@ -546,14 +535,14 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) {
forward_button->set_flat(true);
forward_button->set_tooltip(TTR("Go to the next edited object in history."));
forward_button->set_disabled(true);
- forward_button->connect_compat("pressed", this, "_edit_forward");
+ forward_button->connect("pressed", callable_mp(this, &InspectorDock::_edit_forward));
history_menu = memnew(MenuButton);
history_menu->set_tooltip(TTR("History of recently edited objects."));
history_menu->set_icon(get_icon("History", "EditorIcons"));
general_options_hb->add_child(history_menu);
- history_menu->connect_compat("about_to_show", this, "_prepare_history");
- history_menu->get_popup()->connect_compat("id_pressed", this, "_select_history");
+ history_menu->connect("about_to_show", callable_mp(this, &InspectorDock::_prepare_history));
+ history_menu->get_popup()->connect("id_pressed", callable_mp(this, &InspectorDock::_select_history));
HBoxContainer *node_info_hb = memnew(HBoxContainer);
add_child(node_info_hb);
@@ -566,12 +555,12 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) {
object_menu->set_icon(get_icon("Tools", "EditorIcons"));
node_info_hb->add_child(object_menu);
object_menu->set_tooltip(TTR("Object properties."));
- object_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option");
+ object_menu->get_popup()->connect("id_pressed", callable_mp(this, &InspectorDock::_menu_option));
new_resource_dialog = memnew(CreateDialog);
editor->get_gui_base()->add_child(new_resource_dialog);
new_resource_dialog->set_base_type("Resource");
- new_resource_dialog->connect_compat("create", this, "_resource_created");
+ new_resource_dialog->connect("create", callable_mp(this, &InspectorDock::_resource_created));
search = memnew(LineEdit);
search->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -587,7 +576,7 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) {
warning->add_color_override("font_color", get_color("warning_color", "Editor"));
warning->set_clip_text(true);
warning->hide();
- warning->connect_compat("pressed", this, "_warning_pressed");
+ warning->connect("pressed", callable_mp(this, &InspectorDock::_warning_pressed));
warning_dialog = memnew(AcceptDialog);
editor->get_gui_base()->add_child(warning_dialog);
@@ -595,7 +584,7 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) {
load_resource_dialog = memnew(EditorFileDialog);
add_child(load_resource_dialog);
load_resource_dialog->set_current_dir("res://");
- load_resource_dialog->connect_compat("file_selected", this, "_resource_file_selected");
+ load_resource_dialog->connect("file_selected", callable_mp(this, &InspectorDock::_resource_file_selected));
inspector = memnew(EditorInspector);
add_child(inspector);
@@ -611,8 +600,8 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) {
inspector->set_use_filter(true); // TODO: check me
- inspector->connect_compat("resource_selected", this, "_resource_selected");
- inspector->connect_compat("property_keyed", this, "_property_keyed");
+ inspector->connect("resource_selected", callable_mp(this, &InspectorDock::_resource_selected));
+ inspector->connect("property_keyed", callable_mp(this, &InspectorDock::_property_keyed));
}
InspectorDock::~InspectorDock() {