pass argc and argv to Nz::Application
This commit is contained in:
parent
77ae80b98e
commit
ce17cbd269
|
|
@ -36,7 +36,7 @@ namespace Nz
|
||||||
// Editor events
|
// Editor events
|
||||||
NazaraSignal(OnActionRegistered, const EditorAction::Properties&);
|
NazaraSignal(OnActionRegistered, const EditorAction::Properties&);
|
||||||
|
|
||||||
EditorBaseApplication();
|
EditorBaseApplication(int argc, char** argv);
|
||||||
virtual ~EditorBaseApplication();
|
virtual ~EditorBaseApplication();
|
||||||
|
|
||||||
static EditorBaseApplication* Instance();
|
static EditorBaseApplication* Instance();
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace NzEditor
|
||||||
: public Nz::EditorBaseApplication
|
: public Nz::EditorBaseApplication
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Application();
|
Application(int argc, char** argv);
|
||||||
|
|
||||||
virtual bool NewLevel() override;
|
virtual bool NewLevel() override;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,9 @@ namespace Nz
|
||||||
{
|
{
|
||||||
EditorBaseApplication* EditorBaseApplication::s_instance = nullptr;
|
EditorBaseApplication* EditorBaseApplication::s_instance = nullptr;
|
||||||
|
|
||||||
EditorBaseApplication::EditorBaseApplication()
|
EditorBaseApplication::EditorBaseApplication(int argc, char** argv)
|
||||||
: m_level(this)
|
: Application(argc, argv)
|
||||||
|
, m_level(this)
|
||||||
, m_engineTextureStretchMode(StretchMode::KeepAspectRatio)
|
, m_engineTextureStretchMode(StretchMode::KeepAspectRatio)
|
||||||
{
|
{
|
||||||
NazaraAssert(s_instance == nullptr, "EditorBaseApplication already exists");
|
NazaraAssert(s_instance == nullptr, "EditorBaseApplication already exists");
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,8 @@
|
||||||
|
|
||||||
namespace NzEditor
|
namespace NzEditor
|
||||||
{
|
{
|
||||||
Application::Application()
|
Application::Application(int argc, char** argv)
|
||||||
|
: Nz::EditorBaseApplication(argc, argv)
|
||||||
{
|
{
|
||||||
RegisterWindow<NzEditor::MainWindow>();
|
RegisterWindow<NzEditor::MainWindow>();
|
||||||
RegisterWindow<NzEditor::AssetsWindow>();
|
RegisterWindow<NzEditor::AssetsWindow>();
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ int WinMain(int argc, char* argv[])
|
||||||
|
|
||||||
Nz::EditorLogger logger;
|
Nz::EditorLogger logger;
|
||||||
|
|
||||||
NzEditor::Application app;
|
NzEditor::Application app(argc, argv);
|
||||||
app.SetLogger(logger);
|
app.SetLogger(logger);
|
||||||
|
|
||||||
ImGui::EnsureContextOnThisThread();
|
ImGui::EnsureContextOnThisThread();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue