diff options
author | Markus Sauermann <6299227+Sauermann@users.noreply.github.com> | 2023-06-24 18:32:17 +0200 |
---|---|---|
committer | Markus Sauermann <6299227+Sauermann@users.noreply.github.com> | 2023-08-30 00:07:28 +0200 |
commit | c2d99fd519687dc4749d67cf26b7b09143bc5d02 (patch) | |
tree | a9f7b9fc00b88899720238ef33dce1e1734ed704 /include/godot_cpp/classes | |
parent | dd9586b841374cae7ff17d3512c531f6ea7c13c6 (diff) | |
download | redot-cpp-c2d99fd519687dc4749d67cf26b7b09143bc5d02.tar.gz |
Fix `Object::notification` order
For the notification-order to work correctly, it is necessary to
allow the `p_reversed` argument to be used within cpp.
This PR changes the necessary bindings.
Diffstat (limited to 'include/godot_cpp/classes')
-rw-r--r-- | include/godot_cpp/classes/wrapped.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/godot_cpp/classes/wrapped.hpp b/include/godot_cpp/classes/wrapped.hpp index f2efbd0..6f4d5ca 100644 --- a/include/godot_cpp/classes/wrapped.hpp +++ b/include/godot_cpp/classes/wrapped.hpp @@ -62,7 +62,7 @@ protected: bool _property_get_revert(const StringName &p_name, Variant &r_property) const { return false; } String _to_string() const { return "[" + String(get_class_static()) + ":" + itos(get_instance_id()) + "]"; } - static void notification_bind(GDExtensionClassInstancePtr p_instance, int32_t p_what) {} + static void notification_bind(GDExtensionClassInstancePtr p_instance, int32_t p_what, bool p_reversed) {} static GDExtensionBool set_bind(GDExtensionClassInstancePtr p_instance, GDExtensionConstStringNamePtr p_name, GDExtensionConstVariantPtr p_value) { return false; } static GDExtensionBool get_bind(GDExtensionClassInstancePtr p_instance, GDExtensionConstStringNamePtr p_name, GDExtensionVariantPtr r_ret) { return false; } static const GDExtensionPropertyInfo *get_property_list_bind(GDExtensionClassInstancePtr p_instance, uint32_t *r_count) { return nullptr; } @@ -187,13 +187,13 @@ public: return new_object->_owner; \ } \ \ - static void notification_bind(GDExtensionClassInstancePtr p_instance, int32_t p_what) { \ + static void notification_bind(GDExtensionClassInstancePtr p_instance, int32_t p_what, bool p_reversed) { \ if (p_instance && m_class::_get_notification()) { \ if (m_class::_get_notification() != m_inherits::_get_notification()) { \ m_class *cls = reinterpret_cast<m_class *>(p_instance); \ return cls->_notification(p_what); \ } \ - m_inherits::notification_bind(p_instance, p_what); \ + m_inherits::notification_bind(p_instance, p_what, p_reversed); \ } \ } \ \ |