diff options
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/example.cpp | 8 | ||||
| -rw-r--r-- | test/src/example.h | 10 | ||||
| -rw-r--r-- | test/src/register_types.cpp | 1 |
3 files changed, 19 insertions, 0 deletions
diff --git a/test/src/example.cpp b/test/src/example.cpp index 692d004..f51db57 100644 --- a/test/src/example.cpp +++ b/test/src/example.cpp @@ -755,3 +755,11 @@ ExampleRuntime::ExampleRuntime() { ExampleRuntime::~ExampleRuntime() { } + +void ExamplePrzykład::_bind_methods() { + ClassDB::bind_method(D_METHOD("get_the_word"), &ExamplePrzykład::get_the_word); +} + +String ExamplePrzykład::get_the_word() const { + return U"słowo to przykład"; +} diff --git a/test/src/example.h b/test/src/example.h index a28deff..3ce390a 100644 --- a/test/src/example.h +++ b/test/src/example.h @@ -275,4 +275,14 @@ public: ~ExampleRuntime(); }; +class ExamplePrzykład : public RefCounted { + GDCLASS(ExamplePrzykład, RefCounted); + +protected: + static void _bind_methods(); + +public: + String get_the_word() const; +}; + #endif // EXAMPLE_CLASS_H diff --git a/test/src/register_types.cpp b/test/src/register_types.cpp index 7cfe689..d9290c8 100644 --- a/test/src/register_types.cpp +++ b/test/src/register_types.cpp @@ -30,6 +30,7 @@ void initialize_example_module(ModuleInitializationLevel p_level) { GDREGISTER_CLASS(ExampleBase); GDREGISTER_CLASS(ExampleChild); GDREGISTER_RUNTIME_CLASS(ExampleRuntime); + GDREGISTER_CLASS(ExamplePrzykład); } void uninitialize_example_module(ModuleInitializationLevel p_level) { |
