From 2dd498df7023641960000328cef5ee391d385ac9 Mon Sep 17 00:00:00 2001 From: nathanwfranke Date: Wed, 26 Feb 2020 16:13:01 -0600 Subject: Fix autocomplete and GDScript Highlighting for types Types include new integer types and others --- editor/plugins/script_text_editor.cpp | 15 ++++++++++----- modules/gdscript/gdscript_editor.cpp | 4 ++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 4e0787c805..f4ebd7c3cc 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -292,24 +292,29 @@ void ScriptTextEditor::_set_theme_for_script() { const Color basetype_color = colors_cache.basetype_color; text_edit->add_keyword_color("String", basetype_color); text_edit->add_keyword_color("Vector2", basetype_color); + text_edit->add_keyword_color("Vector2i", basetype_color); text_edit->add_keyword_color("Rect2", basetype_color); - text_edit->add_keyword_color("Transform2D", basetype_color); + text_edit->add_keyword_color("Rect2i", basetype_color); text_edit->add_keyword_color("Vector3", basetype_color); + text_edit->add_keyword_color("Vector3i", basetype_color); + text_edit->add_keyword_color("Transform2D", basetype_color); + text_edit->add_keyword_color("Plane", basetype_color); + text_edit->add_keyword_color("Quat", basetype_color); text_edit->add_keyword_color("AABB", basetype_color); text_edit->add_keyword_color("Basis", basetype_color); - text_edit->add_keyword_color("Plane", basetype_color); text_edit->add_keyword_color("Transform", basetype_color); - text_edit->add_keyword_color("Quat", basetype_color); text_edit->add_keyword_color("Color", basetype_color); - text_edit->add_keyword_color("Object", basetype_color); + text_edit->add_keyword_color("StringName", basetype_color); text_edit->add_keyword_color("NodePath", basetype_color); text_edit->add_keyword_color("RID", basetype_color); + text_edit->add_keyword_color("Object", basetype_color); + text_edit->add_keyword_color("Callable", basetype_color); text_edit->add_keyword_color("Dictionary", basetype_color); text_edit->add_keyword_color("Array", basetype_color); text_edit->add_keyword_color("PackedByteArray", basetype_color); text_edit->add_keyword_color("PackedInt32Array", basetype_color); - text_edit->add_keyword_color("PackedFloat32Array", basetype_color); text_edit->add_keyword_color("PackedInt64Array", basetype_color); + text_edit->add_keyword_color("PackedFloat32Array", basetype_color); text_edit->add_keyword_color("PackedFloat64Array", basetype_color); text_edit->add_keyword_color("PackedStringArray", basetype_color); text_edit->add_keyword_color("PackedVector2Array", basetype_color); diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 85265a1fe5..1bc1aae0d2 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -2172,8 +2172,8 @@ static void _find_identifiers(const GDScriptCompletionContext &p_context, bool p } static const char *_type_names[Variant::VARIANT_MAX] = { - "null", "bool", "int", "float", "String", "Vector2", "Rect2", "Vector3", "Transform2D", "Plane", "Quat", "AABB", "Basis", "Transform", - "Color", "NodePath", "RID", "Object", "Callable", "Signal", "Dictionary", "Array", "PackedByteArray", "PackedInt32Array", "PackedInt64Array", "PackedFloat32Array", "PackedFloat64Array", "PackedStringArray", + "null", "bool", "int", "float", "String", "Vector2", "Vector2i", "Rect2", "Rect2i", "Vector3", "Vector3i", "Transform2D", "Plane", "Quat", "AABB", "Basis", "Transform", + "Color", "StringName", "NodePath", "RID", "Object", "Callable", "Signal", "Dictionary", "Array", "PackedByteArray", "PackedInt32Array", "PackedInt64Array", "PackedFloat32Array", "PackedFloat64Array", "PackedStringArray", "PackedVector2Array", "PackedVector3Array", "PackedColorArray" }; -- cgit v1.2.3