Files
sophia/editor/main.cpp
T

34 lines
929 B
C++

#include <iostream>
#include <sophia/application.hpp>
#include "panels/asset_browser_panel.hpp"
#include "panels/inspector_panel.hpp"
#include "panels/scene_hierarchy_panel.hpp"
#include "panels/viewport_panel.hpp"
class Editor : public sophia::Application {
public:
Editor() : Application{{.width = 750, .height = 1000, .name = "Editor"}} {}
void onCreate() override {
std::cout << "Editor created" << std::endl;
debugUI().show();
panels().emplace<SceneHierarchyPanel>();
panels().emplace<InspectorPanel>();
panels().emplace<AssetBrowserPanel>();
panels().emplace<ViewportPanel>();
panels().setDefaultLayout(
{.left = {"Scene Hierarchy"},
.right = {"Inspector", "Frame Stats", "PanelRegistry"},
.bottom = {"Asset Browser", "Console"},
.center = {"Viewport"}});
}
void onUpdate(const sophia::FrameInfo& frameInfo) override {}
};
SOPHIA_MAIN(Editor)