diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-11-02 10:14:18 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-11-02 10:14:18 -0300 |
commit | eb7036344d4ca6e620f610822a9e2d59219281c2 (patch) | |
tree | 81dd094f19caab756406485778eca533e88e3f0e | |
parent | 4e25f3e4b706f036fd2c4a97e4b73d1c9149f697 (diff) | |
parent | f7eff51969629fea4165189685d231a3a927311d (diff) |
Merge pull request #852 from adolson/autoscan-project-dir
add option to auto-scan a directory for projects
-rw-r--r-- | tools/editor/editor_settings.cpp | 2 | ||||
-rw-r--r-- | tools/editor/project_manager.cpp | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp index 2b54a334bf..bc88896ebb 100644 --- a/tools/editor/editor_settings.cpp +++ b/tools/editor/editor_settings.cpp @@ -386,6 +386,8 @@ void EditorSettings::_load_defaults() { set("global/font",""); hints["global/font"]=PropertyInfo(Variant::STRING,"global/font",PROPERTY_HINT_GLOBAL_FILE,"*.fnt"); + set("global/autoscan_project_path",""); + hints["global/autoscan_project_path"]=PropertyInfo(Variant::STRING,"global/autoscan_project_path",PROPERTY_HINT_GLOBAL_DIR); set("global/default_project_path",""); hints["global/default_project_path"]=PropertyInfo(Variant::STRING,"global/default_project_path",PROPERTY_HINT_GLOBAL_DIR); set("global/default_project_export_path",""); diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp index 5764f9f2d9..4d54a2e49d 100644 --- a/tools/editor/project_manager.cpp +++ b/tools/editor/project_manager.cpp @@ -973,6 +973,11 @@ ProjectManager::ProjectManager() { npdialog->connect("project_created", this,"_load_recent_projects"); _load_recent_projects(); + + if ( EditorSettings::get_singleton()->get("global/autoscan_project_path") ) { + _scan_begin( EditorSettings::get_singleton()->get("global/autoscan_project_path") ); + } + //get_ok()->set_text("Open"); //get_ok()->set_text("Exit"); |