Use BitField hint for the TextServer enums. Add missing parts for BitField support to the GDextension API.

This commit is contained in:
bruvzg 2022-07-11 12:40:31 +03:00
parent e5a1640cf0
commit cbe3a2dcb7
No known key found for this signature in database
GPG key ID: 7960FCF39844EC38
35 changed files with 395 additions and 334 deletions

View file

@ -46,9 +46,12 @@ static String get_type_name(const PropertyInfo &p_info) {
return p_info.hint_string + "*";
}
}
if (p_info.type == Variant::INT && (p_info.usage & (PROPERTY_USAGE_CLASS_IS_ENUM | PROPERTY_USAGE_CLASS_IS_BITFIELD))) {
if (p_info.type == Variant::INT && (p_info.usage & (PROPERTY_USAGE_CLASS_IS_ENUM))) {
return String("enum::") + String(p_info.class_name);
}
if (p_info.type == Variant::INT && (p_info.usage & (PROPERTY_USAGE_CLASS_IS_BITFIELD))) {
return String("bitfield::") + String(p_info.class_name);
}
if (p_info.class_name != StringName()) {
return p_info.class_name;
}