mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Make "Last Modified" the default sorting order for the Project Manager
This commit is contained in:
@@ -707,7 +707,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
||||
|
||||
/* Extra config */
|
||||
|
||||
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "project_manager/sorting_order", 0, "Name,Path,Last Edited")
|
||||
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "project_manager/sorting_order", 0, "Last Edited,Name,Path")
|
||||
|
||||
if (p_extra_config.is_valid()) {
|
||||
if (p_extra_config->has_section("init_projects") && p_extra_config->has_section_key("init_projects", "list")) {
|
||||
|
||||
@@ -1099,7 +1099,7 @@ struct ProjectListComparator {
|
||||
};
|
||||
|
||||
ProjectList::ProjectList() {
|
||||
_order_option = FilterOption::NAME;
|
||||
_order_option = FilterOption::EDIT_DATE;
|
||||
_scroll_children = memnew(VBoxContainer);
|
||||
_scroll_children->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
add_child(_scroll_children);
|
||||
@@ -2492,9 +2492,9 @@ ProjectManager::ProjectManager() {
|
||||
hb->add_child(filter_option);
|
||||
|
||||
Vector<String> sort_filter_titles;
|
||||
sort_filter_titles.push_back(TTR("Last Edited"));
|
||||
sort_filter_titles.push_back(TTR("Name"));
|
||||
sort_filter_titles.push_back(TTR("Path"));
|
||||
sort_filter_titles.push_back(TTR("Last Edited"));
|
||||
|
||||
for (int i = 0; i < sort_filter_titles.size(); i++) {
|
||||
filter_option->add_item(sort_filter_titles[i]);
|
||||
|
||||
@@ -42,9 +42,9 @@ class ProjectDialog;
|
||||
class ProjectList;
|
||||
|
||||
enum FilterOption {
|
||||
EDIT_DATE,
|
||||
NAME,
|
||||
PATH,
|
||||
EDIT_DATE,
|
||||
};
|
||||
|
||||
class ProjectManager : public Control {
|
||||
|
||||
Reference in New Issue
Block a user