summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_parser.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-09-04 09:06:57 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-09-04 09:06:57 +0200
commitdd4fae6162d74c147afc9c7814142fb06fbc87ec (patch)
tree2a8651749b164a58627c4b2d1880384c446bc639 /modules/gdscript/gdscript_parser.cpp
parentfa3428ff25bc577d2a3433090478a6d615567056 (diff)
parent35802374acb826751f03dd2180b64e89f467e99d (diff)
downloadredot-engine-dd4fae6162d74c147afc9c7814142fb06fbc87ec.tar.gz
Merge pull request #74809 from Chaosus/completion_color_xyzw
Add coloring for completion of vector components
Diffstat (limited to 'modules/gdscript/gdscript_parser.cpp')
-rw-r--r--modules/gdscript/gdscript_parser.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index 039d46f678..a0d02b12b5 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -66,6 +66,10 @@ Variant::Type GDScriptParser::get_builtin_type(const StringName &p_type) {
return Variant::VARIANT_MAX;
}
+#ifdef TOOLS_ENABLED
+HashMap<String, String> GDScriptParser::theme_color_names;
+#endif
+
void GDScriptParser::cleanup() {
builtin_types.clear();
}
@@ -121,6 +125,15 @@ GDScriptParser::GDScriptParser() {
#ifdef DEBUG_ENABLED
is_ignoring_warnings = !(bool)GLOBAL_GET("debug/gdscript/warnings/enable");
#endif
+
+#ifdef TOOLS_ENABLED
+ if (theme_color_names.is_empty()) {
+ theme_color_names.insert("x", "axis_x_color");
+ theme_color_names.insert("y", "axis_y_color");
+ theme_color_names.insert("z", "axis_z_color");
+ theme_color_names.insert("w", "axis_w_color");
+ }
+#endif
}
GDScriptParser::~GDScriptParser() {