mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Implement typed dictionaries
This commit is contained in:
parent
906a4e9db9
commit
9853a69144
86 changed files with 3071 additions and 193 deletions
|
@ -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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue