Sort system font menu in Inspector

This commit is contained in:
Haoyu Qiu 2023-07-26 23:56:17 +08:00
parent 202e4b2c1e
commit 7de4fef959

View file

@ -1020,6 +1020,7 @@ EditorPropertyFontNamesArray::EditorPropertyFontNamesArray() {
if (OS::get_singleton()) {
Vector<String> fonts = OS::get_singleton()->get_system_fonts();
fonts.sort();
for (int i = 0; i < fonts.size(); i++) {
menu->add_item(fonts[i], i + 6);
}