C#: Add global class support

Co-authored-by: willnationsdev <willnationsdev@gmail.com>
This commit is contained in:
Raul Santos 2023-02-02 00:54:16 +01:00
parent 2eec9a67d5
commit a1f454fee3
No known key found for this signature in database
GPG key ID: B532473AE3A803E4
15 changed files with 201 additions and 25 deletions

View file

@ -62,6 +62,7 @@ class CSharpScript : public Script {
friend class CSharpLanguage;
bool tool = false;
bool global_class = false;
bool valid = false;
bool reload_invalidated = false;
@ -86,6 +87,8 @@ class CSharpScript : public Script {
#endif
String source;
String class_name;
String icon_path;
SelfList<CSharpScript> script_list = this;
@ -442,6 +445,10 @@ public:
/* TODO? */ void auto_indent_code(String &p_code, int p_from_line, int p_to_line) const override {}
/* TODO */ void add_global_constant(const StringName &p_variable, const Variant &p_value) override {}
/* SCRIPT GLOBAL CLASS FUNCTIONS */
virtual bool handles_global_class_type(const String &p_type) const override;
virtual String get_global_class_name(const String &p_path, String *r_base_type = nullptr, String *r_icon_path = nullptr) const override;
/* DEBUGGER FUNCTIONS */
String debug_get_error() const override;
int debug_get_stack_level_count() const override;