diff options
author | Bastiaan Olij <mux213@gmail.com> | 2021-09-15 13:56:20 +1000 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2021-09-27 23:08:11 +1000 |
commit | e839199848cba6f3470a6f836b2b2992e4593104 (patch) | |
tree | 768781e0caae3e1d9f652776f23e4d840159eb8d /include/godot_cpp/core | |
parent | 02802b1d0e2586dbf6dedd7e4de3589f7eb62680 (diff) | |
download | redot-cpp-e839199848cba6f3470a6f836b2b2992e4593104.tar.gz |
Add support for property groups
Diffstat (limited to 'include/godot_cpp/core')
-rw-r--r-- | include/godot_cpp/core/class_db.hpp | 2 | ||||
-rw-r--r-- | include/godot_cpp/core/object.hpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/godot_cpp/core/class_db.hpp b/include/godot_cpp/core/class_db.hpp index 23c2cc8..aea95a7 100644 --- a/include/godot_cpp/core/class_db.hpp +++ b/include/godot_cpp/core/class_db.hpp @@ -108,6 +108,8 @@ public: static MethodBind *bind_method(N p_method_name, M p_method); template <class M> static MethodBind *bind_vararg_method(uint32_t p_flags, const char *p_name, M p_method, const MethodInfo &p_info = MethodInfo(), const std::vector<Variant> &p_default_args = std::vector<Variant>{}, bool p_return_nil_is_variant = true); + static void add_property_group(const char *p_class, const char *p_name, const char *p_prefix); + static void add_property_subgroup(const char *p_class, const char *p_name, const char *p_prefix); static void add_property(const char *p_class, const PropertyInfo &p_pinfo, const char *p_setter, const char *p_getter, int p_index = -1); static void add_signal(const char *p_class, const MethodInfo &p_signal); static void bind_integer_constant(const char *p_class, const char *p_enum, const char *p_name, GDNativeInt p_constant); diff --git a/include/godot_cpp/core/object.hpp b/include/godot_cpp/core/object.hpp index 61cedcb..dafe809 100644 --- a/include/godot_cpp/core/object.hpp +++ b/include/godot_cpp/core/object.hpp @@ -43,6 +43,8 @@ #include <vector> #define ADD_SIGNAL(m_signal) ClassDB::add_signal(get_class_static(), m_signal) +#define ADD_GROUP(m_name, m_prefix) ::ClassDB::add_property_group(get_class_static(), m_name, m_prefix) +#define ADD_SUBGROUP(m_name, m_prefix) ::ClassDB::add_property_subgroup(get_class_static(), m_name, m_prefix) #define ADD_PROPERTY(m_property, m_setter, m_getter) ClassDB::add_property(get_class_static(), m_property, m_setter, m_getter) namespace godot { |