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:
@ -950,7 +950,7 @@ EditorResourcePicker::EditorResourcePicker(bool p_hide_assign_button_controls) {
|
||||
assign_button->set_flat(true);
|
||||
assign_button->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
assign_button->set_clip_text(true);
|
||||
assign_button->set_drag_forwarding(this);
|
||||
assign_button->set_drag_forwarding_compat(this);
|
||||
add_child(assign_button);
|
||||
assign_button->connect("pressed", callable_mp(this, &EditorResourcePicker::_resource_selected));
|
||||
assign_button->connect("draw", callable_mp(this, &EditorResourcePicker::_button_draw));
|
||||
|
||||
Reference in New Issue
Block a user