Changed MethodBind API to request information from methods. It's much claner now.

Also changed PropertyInfo to include informatino about class names.
This commit is contained in:
Juan Linietsky
2017-08-23 19:10:32 -03:00
parent 21d53f29f3
commit 3d1c031871
14 changed files with 408 additions and 264 deletions

View File

@@ -538,9 +538,7 @@ void ClassDB::get_method_list(StringName p_class, List<MethodInfo> *p_methods, b
minfo.arguments.push_back(method->get_argument_info(i));
}
if (method->get_argument_type(-1) != Variant::NIL) {
minfo.return_val = method->get_argument_info(-1);
}
minfo.return_val = method->get_return_info();
minfo.flags = method->get_hint_flags();
p_methods->push_back(minfo);
@@ -680,7 +678,7 @@ StringName ClassDB::get_integer_constant_enum(const StringName &p_class, const S
List<StringName> &constants_list = type->enum_map.get(*k);
const List<StringName>::Element *found = constants_list.find(p_name);
if (found)
return found->get();
return *k;
}
if (p_no_inheritance)