diff options
author | karroffel <therzog@mail.de> | 2018-01-19 11:49:28 +0100 |
---|---|---|
committer | karroffel <therzog@mail.de> | 2018-01-19 11:49:28 +0100 |
commit | 8c053fc35f480ffd18c2443ed0a7e032f707044e (patch) | |
tree | a08502a5b55d36a53302f281a626d1f9f4bc110a | |
parent | 2e4de7b67dcea307cbb306739d71a6d983165684 (diff) | |
download | redot-cpp-8c053fc35f480ffd18c2443ed0a7e032f707044e.tar.gz |
allow const getter functions
-rw-r--r-- | include/core/Godot.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/core/Godot.hpp b/include/core/Godot.hpp index 6d7f0de..6d0289f 100644 --- a/include/core/Godot.hpp +++ b/include/core/Godot.hpp @@ -440,6 +440,12 @@ void register_property(const char *name, void (T::*setter)(P), P (T::*getter)(), } +template<class T, class P> +void register_property(const char *name, void (T::*setter)(P), P (T::*getter)() const, P default_value, godot_method_rpc_mode rpc_mode = GODOT_METHOD_RPC_MODE_DISABLED, godot_property_usage_flags usage = GODOT_PROPERTY_USAGE_DEFAULT, godot_property_hint hint = GODOT_PROPERTY_HINT_NONE, String hint_string = "") +{ + register_property(name, setter, (P (T::*)()) getter, default_value, rpc_mode, usage, hint, hint_string); +} + template<class T> void register_signal(String name, Dictionary args = Dictionary()) { |