[Complex Text Layouts] Add compatibility for legacy Font resources.

This commit is contained in:
bruvzg 2020-11-27 22:55:24 +02:00
parent b9a2787bd1
commit 3c3590522f
No known key found for this signature in database
GPG key ID: FCED35F1CECE0D3A
4 changed files with 122 additions and 3 deletions

View file

@ -243,8 +243,11 @@ HashMap<StringName, StringName> ClassDB::resource_base_extensions;
HashMap<StringName, StringName> ClassDB::compat_classes;
bool ClassDB::_is_parent_class(const StringName &p_class, const StringName &p_inherits) {
StringName inherits = p_class;
if (!classes.has(p_class)) {
return false;
}
StringName inherits = p_class;
while (inherits.operator String().length()) {
if (inherits == p_inherits) {
return true;