summaryrefslogtreecommitdiff
path: root/core/class_db.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/class_db.h')
-rw-r--r--core/class_db.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/class_db.h b/core/class_db.h
index 092469beb7..5df425e662 100644
--- a/core/class_db.h
+++ b/core/class_db.h
@@ -284,6 +284,15 @@ public:
return bind_methodfi(METHOD_FLAGS_DEFAULT, bind, p_method_name, ptr, 6);
}
+ template <class N, class M>
+ static MethodBind *bind_method(N p_method_name, M p_method, const Variant &p_def1, const Variant &p_def2, const Variant &p_def3, const Variant &p_def4, const Variant &p_def5, const Variant &p_def6, const Variant &p_def7) {
+
+ MethodBind *bind = create_method_bind(p_method);
+ const Variant *ptr[7] = { &p_def1, &p_def2, &p_def3, &p_def4, &p_def5, &p_def6, &p_def7 };
+
+ return bind_methodfi(METHOD_FLAGS_DEFAULT, bind, p_method_name, ptr, 7);
+ }
+
template <class M>
static MethodBind *bind_vararg_method(uint32_t p_flags, StringName p_name, M p_method, const MethodInfo &p_info = MethodInfo(), const Vector<Variant> &p_default_args = Vector<Variant>()) {