#pragma once

/*
	GameEngine and Editor
	by John Ryland
	Copyright (c) 2023
*/

////////////////////////////////////////////////////////////////////////////////////
//	Game Editor Window

#include "MainWindow.h"
#include "EcsSystem.h"
#include "PluginManager.h"
#include "IViewCollection.h"

namespace GameEngine {

class GameEditorWindow : public ApplicationFramework::MainWindow
{
public:
    typedef ApplicationFramework::MainWindow ParentClass;

    GameEditorWindow(ApplicationFramework::IApplication& app, int width, int height, const char* title);
    ~GameEditorWindow() override;

    void SetSchema(GameRuntime::Schema* schema)
    {
        m_entityComponentSystem.SetSchema(schema);
        m_entityComponentSystem.LoadScene("test/scene.xml");
    }

protected:
    void Initialize() override;
    void Shutdown() override;

    void Update() override;
    void AddMenus() override;

private:
    void ShowObjectTemplateEditor();
    void ShowUserWidgetsTest();
    void ShowMemoryEditor();

private:
    ApplicationFramework::IApplication& m_application;
    PluginFramework::PluginManager  m_pluginManager;
    EcsSystem                       m_entityComponentSystem;
    ViewCollection                  m_views;

    bool showObjectTemplateEditor = true;
    bool showUserWidgetsTest = false;
    bool showMemoryEditor = false;
};

} // GameEngine namespace
