diff options
Diffstat (limited to 'test/src/example.cpp')
-rw-r--r-- | test/src/example.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/src/example.cpp b/test/src/example.cpp index e2a6ceb..ad82103 100644 --- a/test/src/example.cpp +++ b/test/src/example.cpp @@ -54,7 +54,9 @@ void Example::_bind_methods() { ClassDB::bind_method(D_METHOD("return_something_const"), &Example::return_something_const); ClassDB::bind_method(D_METHOD("return_extended_ref"), &Example::return_extended_ref); ClassDB::bind_method(D_METHOD("extended_ref_checks"), &Example::extended_ref_checks); + ClassDB::bind_method(D_METHOD("test_array"), &Example::test_array); + ClassDB::bind_method(D_METHOD("test_dictionary"), &Example::test_dictionary); { MethodInfo mi; @@ -145,6 +147,15 @@ Array Example::test_array() const { return arr; } +Dictionary Example::test_dictionary() const { + Dictionary dict; + + dict["hello"] = "world"; + dict["foo"] = "bar"; + + return dict; +} + // Properties. void Example::set_custom_position(const Vector2 &pos) { custom_position = pos; |