Fetch theme editor items from ThemeDB
This commit is contained in:
parent
f8a039e9b5
commit
e86750dcaa
4 changed files with 21 additions and 13 deletions
|
|
@ -373,7 +373,7 @@ void ThemeDB::update_class_instance_items(Node *p_instance) {
|
|||
}
|
||||
}
|
||||
|
||||
void ThemeDB::get_class_items(const StringName &p_class_name, List<ThemeItemBind> *r_list, bool p_include_inherited) {
|
||||
void ThemeDB::get_class_items(const StringName &p_class_name, List<ThemeItemBind> *r_list, bool p_include_inherited, Theme::DataType p_filter_type) {
|
||||
List<StringName> class_hierarchy;
|
||||
StringName class_name = p_class_name;
|
||||
while (class_name != StringName()) {
|
||||
|
|
@ -386,6 +386,9 @@ void ThemeDB::get_class_items(const StringName &p_class_name, List<ThemeItemBind
|
|||
HashMap<StringName, List<ThemeItemBind>>::Iterator E = theme_item_binds_list.find(theme_type);
|
||||
if (E) {
|
||||
for (const ThemeItemBind &F : E->value) {
|
||||
if (p_filter_type != Theme::DATA_TYPE_MAX && F.data_type != p_filter_type) {
|
||||
continue;
|
||||
}
|
||||
if (inherited_props.has(F.item_name)) {
|
||||
continue; // Skip inherited properties.
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue