List "Argument" for each extra bind argument in the connect dialog

This makes the dialog more explicit.
This commit is contained in:
Hugo Locurcio 2021-05-12 17:07:53 +02:00
parent 0c693f8781
commit 994dd314e0
No known key found for this signature in database
GPG Key ID: 39E8F8BE30B0A49C
1 changed files with 5 additions and 5 deletions

View File

@ -66,8 +66,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 {
@ -80,8 +80,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 {
@ -93,7 +93,7 @@ public:
void _get_property_list(List<PropertyInfo> *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)));
}
}