summaryrefslogtreecommitdiffstats
path: root/modules/gdnative/nativescript/nativescript.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-08-16 20:03:49 +0200
committerGitHub <noreply@github.com>2018-08-16 20:03:49 +0200
commit968b31e971da8040d939a38dcdfbc3445100daa8 (patch)
tree0c051c44b8c3fd4955ebb1039606f056042d5fc7 /modules/gdnative/nativescript/nativescript.h
parent69694dde75fc76248cfeef122490faa9d9d5c70e (diff)
parent05f717376b8d318734fc87598b2c524e71dd0e77 (diff)
downloadredot-engine-968b31e971da8040d939a38dcdfbc3445100daa8.tar.gz
Merge pull request #20561 from willnationsdev/script-class-ns
Add NativeScript support for script classes via exported script properties.
Diffstat (limited to 'modules/gdnative/nativescript/nativescript.h')
-rw-r--r--modules/gdnative/nativescript/nativescript.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/gdnative/nativescript/nativescript.h b/modules/gdnative/nativescript/nativescript.h
index 688ed295db..c1f11646b0 100644
--- a/modules/gdnative/nativescript/nativescript.h
+++ b/modules/gdnative/nativescript/nativescript.h
@@ -118,6 +118,9 @@ class NativeScript : public Script {
String class_name;
+ String script_class_name;
+ String script_class_icon_path;
+
#ifndef NO_THREADS
Mutex *owners_lock;
#endif
@@ -135,6 +138,11 @@ public:
void set_library(Ref<GDNativeLibrary> p_library);
Ref<GDNativeLibrary> get_library() const;
+ void set_script_class_name(String p_type);
+ String get_script_class_name() const;
+ void set_script_class_icon_path(String p_icon_path);
+ String get_script_class_icon_path() const;
+
virtual bool can_instance() const;
virtual Ref<Script> get_base_script() const; //for script inheritance
@@ -332,6 +340,9 @@ public:
void set_global_type_tag(int p_idx, StringName p_class_name, const void *p_type_tag);
const void *get_global_type_tag(int p_idx, StringName p_class_name) const;
+
+ virtual bool handles_global_class_type(const String &p_type) const;
+ virtual String get_global_class_name(const String &p_path, String *r_base_type, String *r_icon_path) const;
};
inline NativeScriptDesc *NativeScript::get_script_desc() const {