diff options
Diffstat (limited to 'core/object/object.h')
-rw-r--r-- | core/object/object.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/object/object.h b/core/object/object.h index 16ad7b8832..9416eb7762 100644 --- a/core/object/object.h +++ b/core/object/object.h @@ -149,6 +149,10 @@ enum PropertyUsageFlags { #define ADD_ARRAY_COUNT_WITH_USAGE_FLAGS(m_label, m_count_property, m_count_property_setter, m_count_property_getter, m_prefix, m_property_usage_flags) ClassDB::add_property_array_count(get_class_static(), m_label, m_count_property, _scs_create(m_count_property_setter), _scs_create(m_count_property_getter), m_prefix, m_property_usage_flags) #define ADD_ARRAY(m_array_path, m_prefix) ClassDB::add_property_array(get_class_static(), m_array_path, m_prefix) +// Helper macro to use with PROPERTY_HINT_ARRAY_TYPE for arrays of specific resources: +// PropertyInfo(Variant::ARRAY, "fallbacks", PROPERTY_HINT_ARRAY_TYPE, MAKE_RESOURCE_TYPE_HINT("Font") +#define MAKE_RESOURCE_TYPE_HINT(m_type) vformat("%s/%s:%s", Variant::OBJECT, PROPERTY_HINT_RESOURCE_TYPE, m_type) + struct PropertyInfo { Variant::Type type = Variant::NIL; String name; |