Change set_drag_forwarding() to use callables.

* This solution is much cleaner than the one in 3.x thanks to the use of callables.
* Works without issues in any language (no need to worry about camel or snake case).
* Editor code uses a compatibility function (too much work to redo).

Fixes #59899
This commit is contained in:
Juan Linietsky 2023-01-09 19:24:36 +01:00
parent f5f7d11ac4
commit e6a4debede
30 changed files with 86 additions and 113 deletions

View file

@ -754,7 +754,7 @@ CreateDialog::CreateDialog() {
favorites->connect("cell_selected", callable_mp(this, &CreateDialog::_favorite_selected));
favorites->connect("item_activated", callable_mp(this, &CreateDialog::_favorite_activated));
favorites->add_theme_constant_override("draw_guides", 1);
favorites->set_drag_forwarding(this);
favorites->set_drag_forwarding_compat(this);
fav_vb->add_margin_child(TTR("Favorites:"), favorites, true);
VBoxContainer *rec_vb = memnew(VBoxContainer);