Merge pull request #52267 from williamd67/lookup-symbol-builtin-functions
Show help for built-in functions (@GlobalScope)
This commit is contained in:
commit
886ad727f8
@ -1328,6 +1328,8 @@ void EditorHelp::_help_callback(const String &p_topic) {
|
|||||||
} else if (what == "class_global") {
|
} else if (what == "class_global") {
|
||||||
if (constant_line.has(name)) {
|
if (constant_line.has(name)) {
|
||||||
line = constant_line[name];
|
line = constant_line[name];
|
||||||
|
} else if (method_line.has(name)) {
|
||||||
|
line = method_line[name];
|
||||||
} else {
|
} else {
|
||||||
Map<String, Map<String, int>>::Element *iter = enum_values_line.front();
|
Map<String, Map<String, int>>::Element *iter = enum_values_line.front();
|
||||||
while (true) {
|
while (true) {
|
||||||
|
@ -3078,6 +3078,15 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co
|
|||||||
r_result.class_member = p_symbol;
|
r_result.class_member = p_symbol;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
List<StringName> utility_functions;
|
||||||
|
Variant::get_utility_function_list(&utility_functions);
|
||||||
|
if (utility_functions.find(p_symbol) != nullptr) {
|
||||||
|
r_result.type = ScriptLanguage::LookupResult::RESULT_CLASS_TBD_GLOBALSCOPE;
|
||||||
|
r_result.class_name = "@GlobalScope";
|
||||||
|
r_result.class_member = p_symbol;
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
Loading…
Reference in New Issue
Block a user