Merge pull request #78656 from Repiteo/typed-dictionary

Implement typed dictionaries
This commit is contained in:
Rémi Verschelde 2024-09-06 22:38:13 +02:00
commit 0b4ae20156
No known key found for this signature in database
GPG key ID: C3336907360768E1
86 changed files with 3071 additions and 193 deletions

View file

@ -697,6 +697,10 @@ static String _get_visual_datatype(const PropertyInfo &p_info, bool p_is_arg, co
return _trim_parent_class(class_name, p_base_class);
} else if (p_info.type == Variant::ARRAY && p_info.hint == PROPERTY_HINT_ARRAY_TYPE && !p_info.hint_string.is_empty()) {
return "Array[" + _trim_parent_class(p_info.hint_string, p_base_class) + "]";
} else if (p_info.type == Variant::DICTIONARY && p_info.hint == PROPERTY_HINT_DICTIONARY_TYPE && !p_info.hint_string.is_empty()) {
const String key = p_info.hint_string.get_slice(";", 0);
const String value = p_info.hint_string.get_slice(";", 1);
return "Dictionary[" + _trim_parent_class(key, p_base_class) + ", " + _trim_parent_class(value, p_base_class) + "]";
} else if (p_info.type == Variant::NIL) {
if (p_is_arg || (p_info.usage & PROPERTY_USAGE_NIL_IS_VARIANT)) {
return "Variant";