|
@@ -363,6 +363,10 @@ void GDExtension::_register_extension_class_integer_constant(GDExtensionClassLib
|
|
|
}
|
|
|
|
|
|
void GDExtension::_register_extension_class_property(GDExtensionClassLibraryPtr p_library, GDExtensionConstStringNamePtr p_class_name, const GDExtensionPropertyInfo *p_info, GDExtensionConstStringNamePtr p_setter, GDExtensionConstStringNamePtr p_getter) {
|
|
|
+ _register_extension_class_property_indexed(p_library, p_class_name, p_info, p_setter, p_getter, -1);
|
|
|
+}
|
|
|
+
|
|
|
+void GDExtension::_register_extension_class_property_indexed(GDExtensionClassLibraryPtr p_library, GDExtensionConstStringNamePtr p_class_name, const GDExtensionPropertyInfo *p_info, GDExtensionConstStringNamePtr p_setter, GDExtensionConstStringNamePtr p_getter, GDExtensionInt p_index) {
|
|
|
GDExtension *self = reinterpret_cast<GDExtension *>(p_library);
|
|
|
|
|
|
StringName class_name = *reinterpret_cast<const StringName *>(p_class_name);
|
|
@@ -371,10 +375,9 @@ void GDExtension::_register_extension_class_property(GDExtensionClassLibraryPtr
|
|
|
String property_name = *reinterpret_cast<const StringName *>(p_info->name);
|
|
|
ERR_FAIL_COND_MSG(!self->extension_classes.has(class_name), "Attempt to register extension class property '" + property_name + "' for unexisting class '" + class_name + "'.");
|
|
|
|
|
|
- //Extension *extension = &self->extension_classes[class_name];
|
|
|
PropertyInfo pinfo(*p_info);
|
|
|
|
|
|
- ClassDB::add_property(class_name, pinfo, setter, getter);
|
|
|
+ ClassDB::add_property(class_name, pinfo, setter, getter, p_index);
|
|
|
}
|
|
|
|
|
|
void GDExtension::_register_extension_class_property_group(GDExtensionClassLibraryPtr p_library, GDExtensionConstStringNamePtr p_class_name, GDExtensionConstStringPtr p_group_name, GDExtensionConstStringPtr p_prefix) {
|
|
@@ -542,6 +545,7 @@ void GDExtension::initialize_gdextensions() {
|
|
|
register_interface_function("classdb_register_extension_class_method", (GDExtensionInterfaceFunctionPtr)&GDExtension::_register_extension_class_method);
|
|
|
register_interface_function("classdb_register_extension_class_integer_constant", (GDExtensionInterfaceFunctionPtr)&GDExtension::_register_extension_class_integer_constant);
|
|
|
register_interface_function("classdb_register_extension_class_property", (GDExtensionInterfaceFunctionPtr)&GDExtension::_register_extension_class_property);
|
|
|
+ register_interface_function("classdb_register_extension_class_property_indexed", (GDExtensionInterfaceFunctionPtr)&GDExtension::_register_extension_class_property_indexed);
|
|
|
register_interface_function("classdb_register_extension_class_property_group", (GDExtensionInterfaceFunctionPtr)&GDExtension::_register_extension_class_property_group);
|
|
|
register_interface_function("classdb_register_extension_class_property_subgroup", (GDExtensionInterfaceFunctionPtr)&GDExtension::_register_extension_class_property_subgroup);
|
|
|
register_interface_function("classdb_register_extension_class_signal", (GDExtensionInterfaceFunctionPtr)&GDExtension::_register_extension_class_signal);
|