From 1775c796a482eacc3b620a58ffa9004ce13096b3 Mon Sep 17 00:00:00 2001 From: DualMatrix Date: Sun, 16 Sep 2018 21:01:17 +0200 Subject: Automatically add extra args to func when creating it from create signal window Automatically add extra arguments to function when creating it from create signal window. They will be called extra_arg_1, extra_arg_2,... --- editor/connections_dialog.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index 456e2fa1f0..a1337268ba 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -432,6 +432,9 @@ void ConnectionsDock::_make_or_edit_connection() { if (add_script_function) { // pick up args here before "it" is deleted by update_tree script_function_args = it->get_metadata(0).operator Dictionary()["args"]; + for (int i = 0; i < cToMake.binds.size(); i++) { + script_function_args.append("extra_arg_" + itos(i)); + } } if (connect_dialog->is_editing()) { -- cgit v1.2.3