MCPcopy Create free account
hub / github.com/antopilo/Nuake / LoadQueuedProject

Method LoadQueuedProject

Editor/Source/Editor/Windows/WelcomeWindow.cpp:93–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91 }
92
93 void WelcomeWindow::LoadQueuedProject()
94 {
95 FileSystem::SetRootDirectory(FileSystem::GetParentPath(queuedProjectPath));
96 auto project = Project::New();
97 auto projectFileData = FileSystem::ReadFile(queuedProjectPath, true);
98 try
99 {
100 project->Deserialize(nlohmann::json::parse(projectFileData));
101 project->FullPath = queuedProjectPath;
102
103 Engine::LoadProject(project);
104
105 _Editor->filesystem->m_CurrentDirectory = Nuake::FileSystem::RootDirectory;
106 }
107 catch (std::exception exception)
108 {
109 Logger::Log("Error loading project: " + queuedProjectPath, "editor", CRITICAL);
110 Logger::Log(exception.what());
111 return;
112 }
113
114 queuedProjectPath = "";
115 Engine::GetCurrentWindow()->SetTitle("Nuake Engine - Editing " + project->Name);
116 }
117
118 void WelcomeWindow::ImportProject(const std::string& file)
119 {

Callers 1

DrawMethod · 0.80

Calls 6

parseFunction · 0.85
LogFunction · 0.85
GetCurrentWindowFunction · 0.85
DeserializeMethod · 0.45
whatMethod · 0.45
SetTitleMethod · 0.45

Tested by

no test coverage detected