diff options
author | Juan Linietsky <juan@godotengine.org> | 2020-02-20 15:32:36 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-02-21 13:46:45 +0100 |
commit | 04bb6a708a5b68ed199e5caa92d16a50992caf52 (patch) | |
tree | 0975beb458ec9c7449cb6a9a39fc7a6c12aa0624 /editor/inspector_dock.cpp | |
parent | a24aafcb92992f860694bf411acab1080fc0b3db (diff) |
Created the callable_mp macro, for signals to call method pointers directly.
Diffstat (limited to 'editor/inspector_dock.cpp')
-rw-r--r-- | editor/inspector_dock.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp index 4effdc63d1..85356a209f 100644 --- a/editor/inspector_dock.cpp +++ b/editor/inspector_dock.cpp @@ -349,7 +349,6 @@ void InspectorDock::_bind_methods() { ClassDB::bind_method("_property_keyed", &InspectorDock::_property_keyed); ClassDB::bind_method("_transform_keyed", &InspectorDock::_transform_keyed); - ClassDB::bind_method("_new_resource", &InspectorDock::_new_resource); 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); @@ -511,7 +510,7 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) { resource_new_button->set_tooltip(TTR("Create a new resource in memory and edit it.")); resource_new_button->set_icon(get_icon("New", "EditorIcons")); general_options_hb->add_child(resource_new_button); - resource_new_button->connect_compat("pressed", this, "_new_resource"); + resource_new_button->connect("pressed", callable_mp(this, &InspectorDock::_new_resource)); resource_new_button->set_focus_mode(Control::FOCUS_NONE); resource_load_button = memnew(ToolButton); |