diff options
author | Yuri Sizov <11782833+YuriSizov@users.noreply.github.com> | 2022-08-23 17:52:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-23 17:52:32 +0300 |
commit | ba0421f3d907b1a3fc94e05f6c20b158e9aa7021 (patch) | |
tree | a9a547e2bd918830d8181a4e00918e8623e1fb23 /editor/project_manager.cpp | |
parent | e95872eb7f4e94f8daac565d67020bb2260e92bd (diff) | |
parent | 7849331ec535aad82c42aaca0b72c359f52d3e6f (diff) | |
download | redot-engine-ba0421f3d907b1a3fc94e05f6c20b158e9aa7021.tar.gz |
Merge pull request #64637 from Calinou/default-project-icon-use-svg
Create a SVG default project icon in new projects
Diffstat (limited to 'editor/project_manager.cpp')
-rw-r--r-- | editor/project_manager.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 46eb7ac17c..cce71d9508 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -484,12 +484,20 @@ private: project_features.sort(); initial_settings["application/config/features"] = project_features; initial_settings["application/config/name"] = project_name->get_text().strip_edges(); - initial_settings["application/config/icon"] = "res://icon.png"; + initial_settings["application/config/icon"] = "res://icon.svg"; if (ProjectSettings::get_singleton()->save_custom(dir.plus_file("project.godot"), initial_settings, Vector<String>(), false) != OK) { set_message(TTR("Couldn't create project.godot in project path."), MESSAGE_ERROR); } else { - ResourceSaver::save(create_unscaled_default_project_icon(), dir.plus_file("icon.png")); + // Store default project icon in SVG format. + Error err; + Ref<FileAccess> fa_icon = FileAccess::open(dir.plus_file("icon.svg"), FileAccess::WRITE, &err); + fa_icon->store_string(get_default_project_icon()); + + if (err != OK) { + set_message(TTR("Couldn't create icon.svg in project path."), MESSAGE_ERROR); + } + EditorVCSInterface::create_vcs_metadata_files(EditorVCSInterface::VCSMetadata(vcs_metadata_selection->get_selected()), dir); } } else if (mode == MODE_INSTALL) { |