mirror of
https://github.com/godotengine/godot.git
synced 2025-10-29 12:44:31 +00:00
new file dialog!
-ItemList control for easier lists/thumbnails -New file dialog, with support for thumbnails, favorites, recent places, etc -Moved .fscache out of the project, no more bugs due to committed/pulled .fscache! -Dir dialog now sorts directories
This commit is contained in:
parent
07a466f6e6
commit
9acab32daa
75 changed files with 2219 additions and 214 deletions
|
|
@ -43,6 +43,7 @@ void EditorDirDialog::_update_dir(TreeItem* p_item) {
|
|||
da->list_dir_begin();
|
||||
String p=da->get_next();
|
||||
|
||||
List<String> dirs;
|
||||
bool ishidden;
|
||||
bool show_hidden = EditorSettings::get_singleton()->get("file_dialog/show_hidden_files");
|
||||
|
||||
|
|
@ -52,16 +53,22 @@ void EditorDirDialog::_update_dir(TreeItem* p_item) {
|
|||
|
||||
if (show_hidden || !ishidden) {
|
||||
if (da->current_is_dir() && !p.begins_with(".")) {
|
||||
TreeItem *ti = tree->create_item(p_item);
|
||||
ti->set_text(0,p);
|
||||
ti->set_icon(0,get_icon("Folder","EditorIcons"));
|
||||
ti->set_collapsed(true);
|
||||
dirs.push_back(p);
|
||||
}
|
||||
}
|
||||
|
||||
p=da->get_next();
|
||||
}
|
||||
|
||||
dirs.sort();
|
||||
|
||||
for(List<String>::Element *E=dirs.front();E;E=E->next()) {
|
||||
TreeItem *ti = tree->create_item(p_item);
|
||||
ti->set_text(0,E->get());
|
||||
ti->set_icon(0,get_icon("Folder","EditorIcons"));
|
||||
ti->set_collapsed(true);
|
||||
|
||||
}
|
||||
|
||||
memdelete(da);
|
||||
updating=false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue