Merge pull request #36545 from nathanwfranke/syntax-highlight-int-types

Fix autocomplete and highlighting for new integer types
This commit is contained in:
Rémi Verschelde 2020-02-27 14:20:10 +01:00 committed by GitHub
commit ac446570d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 7 deletions

View file

@ -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);

View file

@ -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"
};