Fix naming
parent
8f007c6331
commit
3c7f444353
|
@ -51,13 +51,13 @@
|
|||
#define ADD_GROUP(m_name, m_prefix) godot::ClassDB::add_property_group(get_class_static(), m_name, m_prefix)
|
||||
#define ADD_SUBGROUP(m_name, m_prefix) godot::ClassDB::add_property_subgroup(get_class_static(), m_name, m_prefix)
|
||||
#define ADD_PROPERTY(m_property, m_setter, m_getter) godot::ClassDB::add_property(get_class_static(), m_property, m_setter, m_getter)
|
||||
#define AUTO_ADD_PROPERTY(p_property, p_method) \
|
||||
{ \
|
||||
auto get = &godot::detail::member_traits<decltype(p_method)>::object_type::_get_data_member<p_method>; \
|
||||
auto set = &godot::detail::member_traits<decltype(p_method)>::object_type::_set_data_member<p_method>; \
|
||||
ClassDB::bind_method(D_METHOD(&#p_method[1]), get); \
|
||||
ClassDB::bind_method(D_METHOD(&#p_method[1]), set); \
|
||||
ClassDB::add_property(get_class_static(), p_property, &#p_method[1], &#p_method[1]); \
|
||||
#define AUTO_ADD_PROPERTY(p_property, p_method) \
|
||||
{ \
|
||||
auto get = &godot::internal::MemberPointerTraits<decltype(p_method)>::object_type::_get_data_member<p_method>; \
|
||||
auto set = &godot::internal::MemberPointerTraits<decltype(p_method)>::object_type::_set_data_member<p_method>; \
|
||||
ClassDB::bind_method(D_METHOD(StringName("get") + StringName(&#p_method[1])), get); \
|
||||
ClassDB::bind_method(D_METHOD(StringName("set") + StringName(&#p_method[1])), set); \
|
||||
ClassDB::add_property(get_class_static(), p_property, StringName("set") + StringName(&#p_method[1]), StringName("get") + StringName(&#p_method[1])); \
|
||||
}
|
||||
#define ADD_PROPERTYI(m_property, m_setter, m_getter, m_index) godot::ClassDB::add_property(get_class_static(), m_property, m_setter, m_getter, m_index)
|
||||
|
||||
|
|
Loading…
Reference in New Issue