Storing Editor window

This commit is contained in:
SweetId 2023-11-20 14:59:58 +05:30
parent 13a50a87dd
commit 47490ed586
2 changed files with 4 additions and 0 deletions

View File

@ -77,10 +77,13 @@ namespace Nz
}
inline entt::handle GetMainCamera() { return m_mainCamera; }
inline Nz::Window* GetWindow() { return m_window; }
inline const Nz::Window* GetWindow() const { return m_window; }
private:
static EditorBaseApplication* s_instance;
Nz::Window* m_window;
std::unique_ptr<Nz::WindowSwapchain> m_windowSwapchain;
std::vector<std::unique_ptr<Nz::EditorWindow>> m_windows;

View File

@ -18,6 +18,7 @@ namespace Nz
std::string windowTitle = "Nazara Editor";
Nz::Window& window = windowing.CreateWindow(Nz::VideoMode(1280, 720, 32), windowTitle);
m_windowSwapchain = std::make_unique<Nz::WindowSwapchain>(device, window);
m_window = &window;
// connect basic handler
window.GetEventHandler().OnQuit.Connect([&window](const auto* handler) {