summaryrefslogtreecommitdiff
path: root/modules/mono/mono_gd
diff options
context:
space:
mode:
authorPaul Joannon <hello@pauljoannon.com>2018-01-18 23:27:43 +0100
committerPaul Joannon <hello@pauljoannon.com>2018-02-17 19:37:02 +0100
commitcfbd7fd21e6630cc513ac3a36849c0f796d142c3 (patch)
tree60d5f142ec6c1a989f26223d16ce2a327e016641 /modules/mono/mono_gd
parentefd52cd1725145dc9c8038477dbe133b23868e99 (diff)
implement signal related methods in csharp_script so signals can be used with emit
Diffstat (limited to 'modules/mono/mono_gd')
-rw-r--r--modules/mono/mono_gd/gd_mono_method.cpp14
-rw-r--r--modules/mono/mono_gd/gd_mono_method.h3
2 files changed, 17 insertions, 0 deletions
diff --git a/modules/mono/mono_gd/gd_mono_method.cpp b/modules/mono/mono_gd/gd_mono_method.cpp
index 1f8e9a1926..df0985f6ac 100644
--- a/modules/mono/mono_gd/gd_mono_method.cpp
+++ b/modules/mono/mono_gd/gd_mono_method.cpp
@@ -229,6 +229,20 @@ String GDMonoMethod::get_signature_desc(bool p_namespaces) const {
return res;
}
+void GDMonoMethod::get_parameter_names(Vector<StringName> &names) const {
+ const char *_names[params_count];
+ mono_method_get_param_names(mono_method, _names);
+ for (int i = 0; i < params_count; ++i) {
+ names.push_back(StringName(_names[i]));
+ }
+}
+
+void GDMonoMethod::get_parameter_types(Vector<ManagedType> &types) const {
+ for (int i = 0; i < param_types.size(); ++i) {
+ types.push_back(param_types[i]);
+ }
+}
+
GDMonoMethod::GDMonoMethod(StringName p_name, MonoMethod *p_method) {
name = p_name;
diff --git a/modules/mono/mono_gd/gd_mono_method.h b/modules/mono/mono_gd/gd_mono_method.h
index 14df8dcfb4..a173af83f4 100644
--- a/modules/mono/mono_gd/gd_mono_method.h
+++ b/modules/mono/mono_gd/gd_mono_method.h
@@ -80,6 +80,9 @@ public:
String get_ret_type_full_name() const;
String get_signature_desc(bool p_namespaces = false) const;
+ void get_parameter_names(Vector<StringName> &names) const;
+ void get_parameter_types(Vector<ManagedType> &types) const;
+
GDMonoMethod(StringName p_name, MonoMethod *p_method);
~GDMonoMethod();
};