window now stores application pointer (remove needs for singleton)
This commit is contained in:
@@ -8,11 +8,13 @@ namespace Nz
|
||||
{
|
||||
using ActionCallback = std::function<void(void)>;
|
||||
|
||||
class EditorBaseApplication;
|
||||
|
||||
class NAZARAEDITOR_CORE_API EditorWindow
|
||||
: private Nz::ImguiHandler
|
||||
{
|
||||
public:
|
||||
EditorWindow(const std::string& name = "");
|
||||
EditorWindow(EditorBaseApplication* app, const std::string& name = "");
|
||||
~EditorWindow();
|
||||
|
||||
EditorWindow(const EditorWindow&) = delete;
|
||||
@@ -29,6 +31,7 @@ namespace Nz
|
||||
private:
|
||||
void DrawMenus();
|
||||
|
||||
EditorBaseApplication* m_application;
|
||||
std::string m_windowName;
|
||||
|
||||
struct MenuAction
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
EditorWindow::EditorWindow(const std::string& name)
|
||||
: m_windowName(name)
|
||||
EditorWindow::EditorWindow(EditorBaseApplication* app, const std::string& name)
|
||||
: m_application(app)
|
||||
, m_windowName(name)
|
||||
{
|
||||
Nz::Imgui::Instance()->AddHandler(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user