Small changes to the comments in the script templates.

This commit is contained in:
Michael Alexsander Silva Dias 2018-05-28 14:34:41 -03:00
parent 07d4cd7f6d
commit fd17b960e9
3 changed files with 19 additions and 21 deletions

View file

@ -2862,7 +2862,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
error_dialog = memnew(AcceptDialog);
add_child(error_dialog);
error_dialog->get_ok()->set_text(TTR("I see.."));
error_dialog->get_ok()->set_text(TTR("I see..."));
debugger = memnew(ScriptEditorDebugger(editor));
debugger->connect("goto_script_line", this, "_goto_script_line");

View file

@ -54,18 +54,18 @@ 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 {
String _template = String() +
"extends %BASE%\n\n" +
"# class member variables go here, for example:\n" +
"# var a = 2\n" +
"# var b = \"textvar\"\n\n" +
"func _ready():\n" +
"%TS%# Called when the node is added to the scene for the first time.\n" +
"%TS%# Initialization here.\n" +
"%TS%pass\n\n" +
"#func _process(delta):\n" +
"#%TS%# Called every frame. Delta is time since last frame.\n" +
"#%TS%# Update game logic here.\n" +
String _template = "extends %BASE%\n"
"\n"
"# Declare member variables here. Examples:\n"
"# var a = 2\n"
"# var b = \"text\"\n"
"\n"
"# Called when the node enters the scene tree for the first time.\n"
"func _ready():\n"
"%TS%pass # Replace with function body.\n"
"\n"
"# Called every frame. 'delta' is the elapsed time since the previous frame.\n"
"#func _process(delta):\n"
"#%TS%pass\n";
_template = _template.replace("%BASE%", p_base_class_name);

View file

@ -298,22 +298,20 @@ Ref<Script> CSharpLanguage::get_template(const String &p_class_name, const Strin
"\n"
"public class %CLASS_NAME% : %BASE_CLASS_NAME%\n"
"{\n"
" // Member variables here, example:\n"
" // Declare member variables here. Examples:\n"
" // private int a = 2;\n"
" // private string b = \"textvar\";\n"
" // private string b = \"text\";\n"
"\n"
" // Called when the node enters the scene tree for the first time."
" public override void _Ready()\n"
" {\n"
" // Called every time the node is added to the scene.\n"
" // Initialization here.\n"
" \n"
" "
" }\n"
"\n"
"// // Called every frame. 'delta' is the elapsed time since the previous frame."
"// public override void _Process(float delta)\n"
"// {\n"
"// // Called every frame. Delta is time since last frame.\n"
"// // Update game logic here.\n"
"// \n"
"// "
"// }\n"
"}\n";