From 7b261d1cb7b8025cb999d9e5e11de256e198e128 Mon Sep 17 00:00:00 2001 From: Yuri Roubinsky Date: Wed, 19 May 2021 14:40:03 +0300 Subject: [PATCH] Show colored rects for autocompletion of Color constants in functions --- modules/gdscript/gdscript_editor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 6ae825d2bd3..c65f97e6370 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -741,6 +741,7 @@ static void _find_identifiers_in_suite(const GDScriptParser::SuiteNode *p_suite, ScriptCodeCompletionOption option; if (p_suite->locals[i].type == GDScriptParser::SuiteNode::Local::CONSTANT) { option = ScriptCodeCompletionOption(p_suite->locals[i].name, ScriptCodeCompletionOption::KIND_CONSTANT); + option.default_value = p_suite->locals[i].constant->initializer->reduced_value; } else { option = ScriptCodeCompletionOption(p_suite->locals[i].name, ScriptCodeCompletionOption::KIND_VARIABLE); }