Browse Source

Merge pull request #6400 from razvanc-r/template

Update GDScript template
Rémi Verschelde 9 years ago
parent
commit
6f7b2d277f
1 changed files with 5 additions and 7 deletions
  1. 5 7
      modules/gdscript/gd_editor.cpp

+ 5 - 7
modules/gdscript/gd_editor.cpp

@@ -47,16 +47,14 @@ void GDScriptLanguage::get_string_delimiters(List<String> *p_delimiters) const {
 Ref<Script> GDScriptLanguage::get_template(const String& p_class_name, const String& p_base_class_name) const {
 Ref<Script> GDScriptLanguage::get_template(const String& p_class_name, const String& p_base_class_name) const {
 
 
 	String _template = String()+
 	String _template = String()+
-	"\nextends %BASE%\n\n"+
-	"# member variables here, example:\n"+
-	"# var a=2\n"+
-	"# var b=\"textvar\"\n\n"+
+	"extends %BASE%\n\n"+
+	"# class member variables go here, for example:\n"+
+	"# var a = 2\n"+
+	"# var b = \"textvar\"\n\n"+
 	"func _ready():\n"+
 	"func _ready():\n"+
 	"\t# Called every time the node is added to the scene.\n"+
 	"\t# Called every time the node is added to the scene.\n"+
 	"\t# Initialization here\n"+
 	"\t# Initialization here\n"+
-	"\tpass\n"+
-	"\n"+
-	"\n";
+	"\tpass\n";
 
 
 	_template = _template.replace("%BASE%",p_base_class_name);
 	_template = _template.replace("%BASE%",p_base_class_name);