Add support for _notification, _set, _get, _get_property_list, _property_can_revert, _property_get_revert, and _to_string methods.

This commit is contained in:
bruvzg
2022-08-19 10:30:06 +03:00
parent f454253005
commit 270ad28931
11 changed files with 447 additions and 119 deletions

View File

@@ -158,14 +158,14 @@ void ClassDB::register_class() {
// Register this class with Godot
GDNativeExtensionClassCreationInfo class_info = {
nullptr, // GDNativeExtensionClassSet set_func;
nullptr, // GDNativeExtensionClassGet get_func;
nullptr, // GDNativeExtensionClassGetPropertyList get_property_list_func;
nullptr, // GDNativeExtensionClassFreePropertyList free_property_list_func;
nullptr, // GDNativeExtensionClassPropertyCanRevert property_can_revert_func;
nullptr, // GDNativeExtensionClassPropertyGetRevert property_get_revert_func;
nullptr, // GDNativeExtensionClassNotification notification_func;
nullptr, // GDNativeExtensionClassToString to_string_func;
T::set_bind, // GDNativeExtensionClassSet set_func;
T::get_bind, // GDNativeExtensionClassGet get_func;
T::get_property_list_bind, // GDNativeExtensionClassGetPropertyList get_property_list_func;
T::free_property_list_bind, // GDNativeExtensionClassFreePropertyList free_property_list_func;
T::property_can_revert_bind, // GDNativeExtensionClassPropertyCanRevert property_can_revert_func;
T::property_get_revert_bind, // GDNativeExtensionClassPropertyGetRevert property_get_revert_func;
T::notification_bind, // GDNativeExtensionClassNotification notification_func;
T::to_string_bind, // GDNativeExtensionClassToString to_string_func;
nullptr, // GDNativeExtensionClassReference reference_func;
nullptr, // GDNativeExtensionClassUnreference unreference_func;
T::create, // GDNativeExtensionClassCreateInstance create_instance_func; /* this one is mandatory */