1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Autocompletion: Add support for global enums

This commit is contained in:
HolonProduction
2025-01-30 12:41:51 +01:00
parent 019ab8745f
commit af54b13603
13 changed files with 106 additions and 9 deletions

View File

@@ -863,3 +863,13 @@ void CoreConstants::get_enum_values(const StringName &p_enum, HashMap<StringName
(*p_values)[constant.name] = constant.value;
}
}
#ifdef TOOLS_ENABLED
void CoreConstants::get_global_enums(List<StringName> *r_values) {
for (const KeyValue<StringName, Vector<_CoreConstant>> &global_enum : _global_enums) {
r_values->push_back(global_enum.key);
}
}
#endif