diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-08-23 08:24:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-23 08:24:00 +0200 |
commit | 2477d414a1643e94f411843ad48e58d32076600e (patch) | |
tree | d70f1f364fc310cd4fc8e26c7b32b01e3b3e07bb /editor/script_create_dialog.h | |
parent | d5675c399681a4ed191e9420ff1d5164f4be0aa9 (diff) | |
parent | f013596760da0631bc6efb4c5ab527bf1553c1de (diff) |
Merge pull request #31111 from Xrayez/script-templates-project
Allow to define and load script templates per project
Diffstat (limited to 'editor/script_create_dialog.h')
-rw-r--r-- | editor/script_create_dialog.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/editor/script_create_dialog.h b/editor/script_create_dialog.h index 202846fd3c..31cf2478cf 100644 --- a/editor/script_create_dialog.h +++ b/editor/script_create_dialog.h @@ -78,8 +78,25 @@ class ScriptCreateDialog : public ConfirmationDialog { int current_language; int default_language; bool re_check_path; + + enum ScriptOrigin { + SCRIPT_ORIGIN_PROJECT, + SCRIPT_ORIGIN_EDITOR, + }; + struct ScriptTemplateInfo { + int id; + ScriptOrigin origin; + String dir; + String name; + String extension; + }; + String script_template; - Vector<String> template_list; + Vector<ScriptTemplateInfo> template_list; + Map<String, Vector<int> > template_overrides; // name : indices + + void _update_script_templates(const String &p_extension); + String base_type; void _path_hbox_sorted(); |