Add MAKE_RESOURCE_TYPE_HINT macro to simplify binding arrays of resources
This commit is contained in:
parent
f6f8a48459
commit
5d20dccade
9 changed files with 16 additions and 12 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue