diff options
Diffstat (limited to 'modules/gdscript/gd_editor.cpp')
-rw-r--r-- | modules/gdscript/gd_editor.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp index b0408917a4..d9b10ff3fa 100644 --- a/modules/gdscript/gd_editor.cpp +++ b/modules/gdscript/gd_editor.cpp @@ -61,7 +61,11 @@ Ref<Script> GDScriptLanguage::get_template(const String &p_class_name, const Str "func _ready():\n" + "%TS%# Called every time the node is added to the scene.\n" + "%TS%# Initialization here\n" + - "%TS%pass\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" + + "#%TS%pass\n"; _template = _template.replace("%BASE%", p_base_class_name); _template = _template.replace("%TS%", _get_indentation()); @@ -127,6 +131,11 @@ bool GDScriptLanguage::has_named_classes() const { return false; } +bool GDScriptLanguage::supports_builtin_mode() const { + + return true; +} + int GDScriptLanguage::find_function(const String &p_function, const String &p_code) const { GDTokenizerText tokenizer; @@ -2102,9 +2111,9 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base for (List<String>::Element *E = opts.front(); E; E = E->next()) { String opt = E->get().strip_edges(); - if (opt.begins_with("\"") && opt.ends_with("\"")) { + if (opt.is_quoted()) { r_forced = true; - String idopt = opt.substr(1, opt.length() - 2); + String idopt = opt.unquote(); if (idopt.replace("/", "_").is_valid_identifier()) { options.insert(idopt); } else { |