Files
Nuake-custom/Nuake/src/Resource/Project.h
2023-08-03 18:56:30 -04:00

39 lines
924 B
C++

#pragma once
#include <string>
#include "../Core/Core.h"
#include "../Scene/Scene.h"
#include "Serializable.h"
#include "FGD/FGDFile.h"
namespace Nuake
{
class Project : public ISerializable
{
public:
std::string Name;
std::string Description;
std::string FullPath;
// Path of the trenchbroom .exe folder
std::string TrenchbroomPath = "";
Ref<Scene> DefaultScene;
Ref<FGDFile> EntityDefinitionsFile;
Project(const std::string& Name, const std::string& Description, const std::string& FullPath, const std::string& defaultScenePath = "");
Project();
void Save();
void SaveAs(const std::string& FullPath);
bool FileExist();
static Ref<Project> New(const std::string& Name, const std::string& Description, const std::string& FullPath);
static Ref<Project> New();
static Ref<Project> Load(std::string& path);
json Serialize() override;
bool Deserialize(const json& j) override;
};
}