Load the previously loaded project and scene on startup
(read from an ini file)
This commit is contained in:
@ -1,6 +1,10 @@
|
||||
#pragma once
|
||||
#include <filesystem>
|
||||
#include <iostream>
|
||||
#include "../../YoggieEngine/src/YoggieEngine.h"
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
|
||||
class Project {
|
||||
public:
|
||||
Project() = default;
|
||||
@ -13,10 +17,21 @@ public:
|
||||
void setProjectDirectory(std::string& path) { ProjectDirectory = std::filesystem::path(path); }
|
||||
const std::filesystem::path GetProjectDirectory() { return ProjectDirectory; }
|
||||
|
||||
|
||||
void AddScene(YoggieEngine::Scene& scene)
|
||||
{
|
||||
Scenes.push_back(&scene);
|
||||
}
|
||||
|
||||
static void SaveProject(std::filesystem::path path, Project& project);
|
||||
static void LoadProject(std::filesystem::path path, Project& project);
|
||||
private:
|
||||
std::string Name;
|
||||
std::filesystem::path ProjectDirectory;
|
||||
|
||||
std::vector<YoggieEngine::Scene*> Scenes;
|
||||
|
||||
friend class YAML::convert<Project>;
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user