diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2021-05-19 14:40:03 +0300 |
---|---|---|
committer | Yuri Roubinsky <chaosus89@gmail.com> | 2021-05-19 14:40:03 +0300 |
commit | 7b261d1cb7b8025cb999d9e5e11de256e198e128 (patch) | |
tree | 7074854ba22768ab7b62f848c74a9d15f8a018be | |
parent | c340ed63943aa7c02064e536ff302de300a02ec2 (diff) |
Show colored rects for autocompletion of Color constants in functions
-rw-r--r-- | modules/gdscript/gdscript_editor.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 6ae825d2bd..c65f97e637 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); } |