diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-07-25 11:14:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-25 11:14:45 +0200 |
commit | 3cc14092104c0cf9cc617824f5d85c2fcaf0e838 (patch) | |
tree | 1d8f070c23060551fd9c451693b2cb632e98d830 /test/src/example.cpp | |
parent | a0b6203854f90d9ef9dd6c5a99eefd886ad9bc1d (diff) | |
parent | 91c56a0ad166edf31329b8a6363e13960b293f0e (diff) | |
download | redot-cpp-3cc14092104c0cf9cc617824f5d85c2fcaf0e838.tar.gz |
Merge pull request #793 from bruvzg/v4_v4i_proj
Diffstat (limited to 'test/src/example.cpp')
-rw-r--r-- | test/src/example.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/src/example.cpp b/test/src/example.cpp index 68eeb2a..992f29c 100644 --- a/test/src/example.cpp +++ b/test/src/example.cpp @@ -101,6 +101,7 @@ void Example::_bind_methods() { ADD_SUBGROUP("Test subgroup", "group_subgroup_"); ClassDB::bind_method(D_METHOD("get_custom_position"), &Example::get_custom_position); + ClassDB::bind_method(D_METHOD("get_v4"), &Example::get_v4); ClassDB::bind_method(D_METHOD("set_custom_position", "position"), &Example::set_custom_position); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "group_subgroup_custom_position"), "set_custom_position", "get_custom_position"); @@ -205,6 +206,10 @@ Vector2 Example::get_custom_position() const { return custom_position; } +Vector4 Example::get_v4() const { + return Vector4(1.2, 3.4, 5.6, 7.8); +} + // Virtual function override. bool Example::_has_point(const Vector2 &point) const { Label *label = get_node<Label>("Label"); |