You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lunarium_OLD/src/run_modes/editor/editor.cpp

61 lines
1.3 KiB
C++

/******************************************************************************
* File - editor.cpp
* Author - Joey Pollack
* Date - 2021/11/01 (y/m/d)
* Mod Date - 2021/11/01 (y/m/d)
* Description - Entry point for the editor run mode.
******************************************************************************/
#include "editor.h"
#include "panels/mainPanel.h"
#include <core/core.h>
#include <utils/logger.h>
namespace lunarium
{
Editor::Editor()
: mLogCat(-1), mpMainPanel(nullptr)
{
}
OpRes Editor::Initialize()
{
mLogCat = Logger::RegisterCategory("EDITOR");
mpMainPanel = &MainPanel::GetInstance();
mpMainPanel->SetEditor(this);
return OpRes::OK();
}
void Editor::Shutdown()
{
MainPanel::FreeInstance();
}
void Editor::OnTick(double delta)
{
}
void Editor::OnRender(IGraphics* g)
{
if (!mpMainPanel->DoFrame())
{
Core::GetInstance().SignalShutdown();
}
}
uint32_t Editor::GetLogCat() const
{
return mLogCat;
}
////////////////////////////////////////////////////////////
// HELPER METHODS
////////////////////////////////////////////////////////////
void Editor::CreatePanels()
{
}
}