From 8361b1ce07266350ef6b6a2d34411030b7e587b2 Mon Sep 17 00:00:00 2001 From: Andreas Haas Date: Tue, 13 Jun 2017 20:03:08 +0000 Subject: [PATCH] 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 --- core/script_language.h | 2 + editor/editor_settings.cpp | 25 +++++++++++++ editor/editor_settings.h | 2 + editor/script_create_dialog.cpp | 50 +++++++++++++++++++++++-- editor/script_create_dialog.h | 3 ++ modules/gdscript/gd_editor.cpp | 13 +++++++ modules/gdscript/gd_script.cpp | 5 +++ modules/gdscript/gd_script.h | 2 + modules/visual_script/visual_script.cpp | 11 ++++++ modules/visual_script/visual_script.h | 2 + 10 files changed, 111 insertions(+), 4 deletions(-) diff --git a/core/script_language.h b/core/script_language.h index 115ab59dcae..6e39593a89f 100644 --- a/core/script_language.h +++ b/core/script_language.h @@ -196,6 +196,8 @@ public: virtual void get_comment_delimiters(List *p_delimiters) const = 0; virtual void get_string_delimiters(List *p_delimiters) const = 0; virtual Ref