Merge pull request #48836 from Chaosus/color_autocompletion_fix
Show colored rects for autocompletion of Color constants in functions
This commit is contained in:
commit
365ab88894
1 changed files with 1 additions and 0 deletions
|
@ -741,6 +741,7 @@ static void _find_identifiers_in_suite(const GDScriptParser::SuiteNode *p_suite,
|
||||||
ScriptCodeCompletionOption option;
|
ScriptCodeCompletionOption option;
|
||||||
if (p_suite->locals[i].type == GDScriptParser::SuiteNode::Local::CONSTANT) {
|
if (p_suite->locals[i].type == GDScriptParser::SuiteNode::Local::CONSTANT) {
|
||||||
option = ScriptCodeCompletionOption(p_suite->locals[i].name, ScriptCodeCompletionOption::KIND_CONSTANT);
|
option = ScriptCodeCompletionOption(p_suite->locals[i].name, ScriptCodeCompletionOption::KIND_CONSTANT);
|
||||||
|
option.default_value = p_suite->locals[i].constant->initializer->reduced_value;
|
||||||
} else {
|
} else {
|
||||||
option = ScriptCodeCompletionOption(p_suite->locals[i].name, ScriptCodeCompletionOption::KIND_VARIABLE);
|
option = ScriptCodeCompletionOption(p_suite->locals[i].name, ScriptCodeCompletionOption::KIND_VARIABLE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue