summaryrefslogtreecommitdiff
path: root/core/script_language.h
diff options
context:
space:
mode:
authorAndreas Haas <hinsbart@gmail.com>2017-06-13 20:03:08 +0000
committerAndreas Haas <hinsbart@gmail.com>2017-06-13 20:03:08 +0000
commit8361b1ce07266350ef6b6a2d34411030b7e587b2 (patch)
treeff9cab7037410224c1b76aab30f394305b523fe8 /core/script_language.h
parenta8a1f2e2a864e6b58d5bcf1c7e53a43cdb6d95d9 (diff)
Add ability to use custom script templates.
Templates will be loaded from .godot/script_templates For now they're disabled for GDNative. Ideas for further improvements: - Add a "Save as Template" option to the script editor, as it can normally only save to res:// - Support more placeholders / custom placeholders
Diffstat (limited to 'core/script_language.h')
-rw-r--r--core/script_language.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/script_language.h b/core/script_language.h
index 115ab59dca..6e39593a89 100644
--- a/core/script_language.h
+++ b/core/script_language.h
@@ -196,6 +196,8 @@ public:
virtual void get_comment_delimiters(List<String> *p_delimiters) const = 0;
virtual void get_string_delimiters(List<String> *p_delimiters) const = 0;
virtual Ref<Script> get_template(const String &p_class_name, const String &p_base_class_name) const = 0;
+ virtual void make_template(const String &p_class_name, const String &p_base_class_name, Ref<Script> &p_script) {}
+ virtual bool is_using_templates() { return false; }
virtual bool validate(const String &p_script, int &r_line_error, int &r_col_error, String &r_test_error, const String &p_path = "", List<String> *r_functions = NULL) const = 0;
virtual Script *create_script() const = 0;
virtual bool has_named_classes() const = 0;