Merge pull request #641 from adolson/default-project-dir

added settings for default project & export dirs
This commit is contained in:
Juan Linietsky 2014-09-17 09:56:49 -03:00
commit 7a610a5c27
3 changed files with 8 additions and 1 deletions

View file

@ -386,6 +386,10 @@ void EditorSettings::_load_defaults() {
set("global/font","");
hints["global/font"]=PropertyInfo(Variant::STRING,"global/font",PROPERTY_HINT_GLOBAL_FILE,"*.fnt");
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","");
hints["global/default_project_export_path"]=PropertyInfo(Variant::STRING,"global/default_project_export_path",PROPERTY_HINT_GLOBAL_DIR);
set("text_editor/background_color",Color::html("3b000000"));
set("text_editor/text_color",Color::html("aaaaaa"));
@ -402,8 +406,8 @@ void EditorSettings::_load_defaults() {
set("text_editor/create_signal_callbacks",true);
set("text_editor/autosave_interval_seconds",60);
set("text_editor/font","");
set("text_editor/auto_brace_complete", false);
hints["text_editor/font"]=PropertyInfo(Variant::STRING,"text_editor/font",PROPERTY_HINT_GLOBAL_FILE,"*.fnt");
set("text_editor/auto_brace_complete", false);
set("3d_editor/default_fov",45.0);

View file

@ -1336,6 +1336,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
file_export = memnew( FileDialog );
add_child(file_export);
file_export->set_access(FileDialog::ACCESS_FILESYSTEM);
file_export->set_current_dir( EditorSettings::get_singleton()->get("global/default_project_export_path") );
file_export->set_title("Export Project");
file_export->connect("file_selected", this,"_export_action");
@ -1353,6 +1354,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
pck_export = memnew( FileDialog );
pck_export->set_access(FileDialog::ACCESS_FILESYSTEM);
pck_export->set_current_dir( EditorSettings::get_singleton()->get("global/default_project_export_path") );
pck_export->set_title("Export Project PCK");
pck_export->connect("file_selected", this,"_export_action_pck");
pck_export->add_filter("*.pck ; Data Pack");

View file

@ -900,6 +900,7 @@ ProjectManager::ProjectManager() {
scan_dir = memnew( FileDialog );
scan_dir->set_access(FileDialog::ACCESS_FILESYSTEM);
scan_dir->set_mode(FileDialog::MODE_OPEN_DIR);
scan_dir->set_current_dir( EditorSettings::get_singleton()->get("global/default_project_path") );
add_child(scan_dir);
scan_dir->connect("dir_selected",this,"_scan_begin");