mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-15 20:08:54 +03:00
Merge branch 'main' into NK-103-Camera-corrupted-transform-2
This commit is contained in:
@@ -41,8 +41,7 @@ namespace Nuake
|
||||
{
|
||||
// Parse the project and load it.
|
||||
std::string projectPath = FileDialog::OpenFile(".project");
|
||||
|
||||
FileSystem::SetRootDirectory(projectPath + "/../");
|
||||
FileSystem::SetRootDirectory(FileSystem::GetParentPath(projectPath));
|
||||
Ref<Project> project = Project::New();
|
||||
if (!project->Deserialize(FileSystem::ReadFile(projectPath, true)))
|
||||
{
|
||||
|
||||
@@ -1291,7 +1291,7 @@ namespace Nuake {
|
||||
if (projectPath == "") // Hit cancel.
|
||||
return;
|
||||
|
||||
FileSystem::SetRootDirectory(projectPath + "/../");
|
||||
FileSystem::SetRootDirectory(FileSystem::GetParentPath(projectPath));
|
||||
Ref<Project> project = Project::New();
|
||||
if (!project->Deserialize(FileSystem::ReadFile(projectPath, true)))
|
||||
{
|
||||
|
||||
@@ -176,15 +176,23 @@ namespace Nuake
|
||||
|
||||
if (ImGui::BeginPopup(hoverMenuId.c_str()))
|
||||
{
|
||||
if (ImGui::MenuItem("Show in File Explorer"))
|
||||
{
|
||||
OS::ShowInFileExplorer(file->GetAbsolutePath());
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::MenuItem("Delete"))
|
||||
{
|
||||
if(FileSystem::RemoveFile(file->GetAbsolutePath()) != 0)
|
||||
{
|
||||
Logger::Log("Failed to remove file: " + file->GetAbsolutePath(), CRITICAL);
|
||||
Logger::Log("Failed to remove file: " + file->GetRelativePath(), CRITICAL);
|
||||
}
|
||||
RefreshFileBrowser();
|
||||
}
|
||||
|
||||
ImGui::EndPopup();
|
||||
RefreshFileBrowser();
|
||||
}
|
||||
|
||||
ImGui::Text(file->GetName().c_str());
|
||||
|
||||
@@ -254,7 +254,7 @@ namespace Nuake
|
||||
SaveRecentFile();
|
||||
|
||||
std::string projectPath = _Projects[SelectedProject].Path;
|
||||
FileSystem::SetRootDirectory(projectPath + "/../");
|
||||
FileSystem::SetRootDirectory(FileSystem::GetParentPath(projectPath));
|
||||
|
||||
auto project = Project::New();
|
||||
auto projectFileData = FileSystem::ReadFile(projectPath, true);
|
||||
|
||||
Reference in New Issue
Block a user