From 8063d69abda36563ce8500be54a14551ee34520d Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Wed, 12 May 2021 17:07:53 +0200 Subject: [PATCH] List "Argument" for each extra bind argument in the connect dialog This makes the dialog more explicit. (cherry picked from commit 994dd314e021d7699e81a5ae3c5bc51f1b247023) --- editor/connections_dialog.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index 39d8d53204c..5bb216d4778 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -65,8 +65,8 @@ public: bool _set(const StringName &p_name, const Variant &p_value) { String name = p_name; - if (name.begins_with("bind/")) { - int which = name.get_slice("/", 1).to_int() - 1; + if (name.begins_with("bind/argument_")) { + int which = name.get_slice("_", 1).to_int() - 1; ERR_FAIL_INDEX_V(which, params.size(), false); params.write[which] = p_value; } else { @@ -79,8 +79,8 @@ public: bool _get(const StringName &p_name, Variant &r_ret) const { String name = p_name; - if (name.begins_with("bind/")) { - int which = name.get_slice("/", 1).to_int() - 1; + if (name.begins_with("bind/argument_")) { + int which = name.get_slice("_", 1).to_int() - 1; ERR_FAIL_INDEX_V(which, params.size(), false); r_ret = params[which]; } else { @@ -92,7 +92,7 @@ public: void _get_property_list(List *p_list) const { for (int i = 0; i < params.size(); i++) { - p_list->push_back(PropertyInfo(params[i].get_type(), "bind/" + itos(i + 1))); + p_list->push_back(PropertyInfo(params[i].get_type(), "bind/argument_" + itos(i + 1))); } }