add ResourceFolder to EditorBaseApplication
This commit is contained in:
parent
52dcc33db4
commit
eb35ee8050
|
|
@ -35,6 +35,8 @@ namespace Nz
|
||||||
EditorBaseApplication();
|
EditorBaseApplication();
|
||||||
virtual ~EditorBaseApplication() = default;
|
virtual ~EditorBaseApplication() = default;
|
||||||
|
|
||||||
|
void SetResourceFolder(const std::filesystem::path& path) { m_resourceFolder = path; }
|
||||||
|
std::filesystem::path GetResourceFolder() const { return m_resourceFolder; }
|
||||||
Nz::Level& GetLevel();
|
Nz::Level& GetLevel();
|
||||||
bool NewLevel();
|
bool NewLevel();
|
||||||
bool CloseLevel();
|
bool CloseLevel();
|
||||||
|
|
@ -61,6 +63,7 @@ namespace Nz
|
||||||
std::unique_ptr<Nz::WindowSwapchain> m_windowSwapchain;
|
std::unique_ptr<Nz::WindowSwapchain> m_windowSwapchain;
|
||||||
std::vector<std::unique_ptr<Nz::EditorWindow>> m_windows;
|
std::vector<std::unique_ptr<Nz::EditorWindow>> m_windows;
|
||||||
|
|
||||||
|
std::filesystem::path m_resourceFolder;
|
||||||
Nz::ActionStack m_actionStack;
|
Nz::ActionStack m_actionStack;
|
||||||
Nz::Level m_level;
|
Nz::Level m_level;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,13 @@ int WinMain(int argc, char* argv[])
|
||||||
NazaraUnused(argv);
|
NazaraUnused(argv);
|
||||||
|
|
||||||
Nz::EditorLogger logger;
|
Nz::EditorLogger logger;
|
||||||
|
|
||||||
|
std::filesystem::path resourceDir = "assets/editor";
|
||||||
|
if (!std::filesystem::is_directory(resourceDir) && std::filesystem::is_directory("../.." / resourceDir))
|
||||||
|
resourceDir = "../.." / resourceDir;
|
||||||
|
|
||||||
NzEditor::Application app;
|
NzEditor::Application app;
|
||||||
|
app.SetResourceFolder(resourceDir);
|
||||||
|
|
||||||
ImGui::EnsureContextOnThisThread();
|
ImGui::EnsureContextOnThisThread();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue