Auto-bind virtual method overrides

This commit is contained in:
George Marques
2021-08-19 20:03:11 -03:00
committed by Bastiaan Olij
parent b3a4a2cf93
commit a0634cca3f
7 changed files with 224 additions and 273 deletions

View File

@@ -76,6 +76,11 @@ protected:
\
m_class(godot::internal::empty_constructor empty) : m_inherits(empty) {} \
\
template <class T> \
static void register_virtuals() { \
m_inherits::register_virtuals<T>(); \
} \
\
public: \
static void initialize_class() { \
static bool initialized = false; \
@@ -85,6 +90,7 @@ public:
m_inherits::initialize_class(); \
if (m_class::_get_bind_methods() != m_inherits::_get_bind_methods()) { \
_bind_methods(); \
m_inherits::register_virtuals<m_class>(); \
} \
initialized = true; \
} \