summaryrefslogtreecommitdiff
path: root/core/make_binders.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/make_binders.py')
-rw-r--r--core/make_binders.py24
1 files changed, 20 insertions, 4 deletions
diff --git a/core/make_binders.py b/core/make_binders.py
index 74b5e9fda3..a5cdb78443 100644
--- a/core/make_binders.py
+++ b/core/make_binders.py
@@ -11,11 +11,18 @@ public:
#ifdef DEBUG_METHODS_ENABLED
virtual Variant::Type _gen_argument_type(int p_arg) const { return _get_argument_type(p_arg); }
Variant::Type _get_argument_type(int p_argument) const {
- $ifret if (p_argument==-1) return Variant::get_type_for<R>();$
- $arg if (p_argument==(@-1)) return Variant::get_type_for<P@>();
+ $ifret if (p_argument==-1) return (Variant::Type)GetTypeInfo<R>::VARIANT_TYPE;$
+ $arg if (p_argument==(@-1)) return (Variant::Type)GetTypeInfo<P@>::VARIANT_TYPE;
$
return Variant::NIL;
}
+ virtual StringName _gen_argument_type_name(int p_arg) const { return _gen_argument_type_hint(p_arg); }
+ StringName _gen_argument_type_hint(int p_argument) const {
+ $ifret if (p_argument==-1) return GetTypeInfo<R>::get_class_name();$
+ $arg if (p_argument==(@-1)) return GetTypeInfo<P@>::get_class_name();
+ $
+ return StringName();
+ }
#endif
virtual String get_instance_class() const {
return T::get_class_static();
@@ -91,11 +98,20 @@ public:
virtual Variant::Type _gen_argument_type(int p_arg) const { return _get_argument_type(p_arg); }
Variant::Type _get_argument_type(int p_argument) const {
- $ifret if (p_argument==-1) return Variant::get_type_for<R>();$
- $arg if (p_argument==(@-1)) return Variant::get_type_for<P@>();
+ $ifret if (p_argument==-1) return (Variant::Type)GetTypeInfo<R>::VARIANT_TYPE;$
+ $arg if (p_argument==(@-1)) return (Variant::Type)GetTypeInfo<P@>::VARIANT_TYPE;
$
return Variant::NIL;
}
+
+ virtual StringName _gen_argument_type_name(int p_arg) const { return _gen_argument_type_hint(p_arg); }
+
+ StringName _gen_argument_type_hint(int p_argument) const {
+ $ifret if (p_argument==-1) return GetTypeInfo<R>::get_class_name();$
+ $arg if (p_argument==(@-1)) return GetTypeInfo<P@>::get_class_name();
+ $
+ return StringName();
+ }
#endif
virtual String get_instance_class() const {
return type_name;