window now stores application pointer (remove needs for singleton)
This commit is contained in:
parent
efadea76ae
commit
c64e015ce1
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue