Signals: Manually port most of remaining connect_compat uses
It's tedious work... Some can't be ported as they depend on private or protected methods of different classes, which is not supported by callable_mp (even if it's a class inherited by the current one).
This commit is contained in:
@ -2972,7 +2972,7 @@ void EditorNode::add_editor_plugin(EditorPlugin *p_editor, bool p_config_changed
|
||||
|
||||
ToolButton *tb = memnew(ToolButton);
|
||||
tb->set_toggle_mode(true);
|
||||
tb->connect_compat("pressed", singleton, "_editor_select", varray(singleton->main_editor_buttons.size()));
|
||||
tb->connect("pressed", callable_mp(singleton, &EditorNode::_editor_select), varray(singleton->main_editor_buttons.size()));
|
||||
tb->set_text(p_editor->get_name());
|
||||
Ref<Texture2D> icon = p_editor->get_icon();
|
||||
|
||||
@ -5473,6 +5473,8 @@ void EditorNode::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_gui_base"), &EditorNode::get_gui_base);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("_on_plugin_ready"), &EditorNode::_on_plugin_ready); // Still used by some connect_compat.
|
||||
|
||||
ClassDB::bind_method("_screenshot", &EditorNode::_screenshot);
|
||||
ClassDB::bind_method("_save_screenshot", &EditorNode::_save_screenshot);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user