diff options
| author | Anton Yabchinskiy | 2015-04-04 09:31:21 +0300 |
|---|---|---|
| committer | Anton Yabchinskiy | 2015-04-04 09:31:21 +0300 |
| commit | 16746f157f83d666079ba3266acec13d35b84c3f (patch) | |
| tree | 8c872d18ccdef90a15e72622cd0139e0e64801a6 /tools/editor/editor_dir_dialog.cpp | |
| parent | 43713810deaadfec6a1656767cf5520073e58a06 (diff) | |
| parent | 5d99e15e43d5a446b35d48e8a3b08a478f1998a9 (diff) | |
| download | godot-16746f157f83d666079ba3266acec13d35b84c3f.tar.gz godot-16746f157f83d666079ba3266acec13d35b84c3f.tar.zst godot-16746f157f83d666079ba3266acec13d35b84c3f.zip | |
Merge branch 'master' of github.com:okamstudio/godot
Diffstat (limited to 'tools/editor/editor_dir_dialog.cpp')
| -rw-r--r-- | tools/editor/editor_dir_dialog.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/tools/editor/editor_dir_dialog.cpp b/tools/editor/editor_dir_dialog.cpp index eee4125e9..eec452ab7 100644 --- a/tools/editor/editor_dir_dialog.cpp +++ b/tools/editor/editor_dir_dialog.cpp @@ -28,6 +28,9 @@ /*************************************************************************/ #include "editor_dir_dialog.h" #include "os/os.h" +#include "os/keyboard.h" +#include "tools/editor/editor_settings.h" + void EditorDirDialog::_update_dir(TreeItem* p_item) { @@ -39,12 +42,21 @@ void EditorDirDialog::_update_dir(TreeItem* p_item) { da->change_dir(cdir); da->list_dir_begin(); String p=da->get_next(); + + bool ishidden; + bool show_hidden = EditorSettings::get_singleton()->get("file_dialog/show_hidden_files"); + while(p!="") { - 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); + + ishidden = da->current_is_hidden(); + + 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); + } } p=da->get_next(); |
