From 5b935f3af1342136447903254c09940b26664d20 Mon Sep 17 00:00:00 2001 From: Antoine Pilote Date: Sat, 30 Sep 2023 14:29:37 -0400 Subject: [PATCH] Fixed importing project file dialog no detected .project files --- Editor/src/Windows/WelcomeWindow.cpp | 4 +++- Editor/src/Windows/WelcomeWindow.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Editor/src/Windows/WelcomeWindow.cpp b/Editor/src/Windows/WelcomeWindow.cpp index 842fd2bf..7c63226e 100644 --- a/Editor/src/Windows/WelcomeWindow.cpp +++ b/Editor/src/Windows/WelcomeWindow.cpp @@ -76,6 +76,8 @@ namespace Nuake { _Projects = std::vector(); + _RecentProjectFilePath = (FileSystem::GetConfigFolderPath() + "recent.json"); + ParseRecentFile(); // Load Nuake logo @@ -166,7 +168,7 @@ namespace Nuake ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0)); if (ImGui::Button("Import an existing project", ImVec2(ImGui::GetContentRegionAvail().x, itemHeight))) { - const std::string path = FileDialog::OpenFile("Project file |*.project"); + const std::string path = FileDialog::OpenFile("Project file(.project)\0*.project\0"); if (path != "" && String::EndsWith(path, ".project")) { // Prevent importing the same project twice in the list diff --git a/Editor/src/Windows/WelcomeWindow.h b/Editor/src/Windows/WelcomeWindow.h index c025bb07..61fde188 100644 --- a/Editor/src/Windows/WelcomeWindow.h +++ b/Editor/src/Windows/WelcomeWindow.h @@ -36,7 +36,7 @@ namespace Nuake Ref _NuakeLogo; EditorInterface* _Editor; - const std::string _RecentProjectFilePath = "recent.json"; + std::string _RecentProjectFilePath = ""; const std::string _RecentProjectFileDefaultContent = "{ \"Projects\": [ ] }"; int32_t SelectedProject = -1;