27 lines
776 B
C++
27 lines
776 B
C++
#include "editor/editor.h"
|
||
#include "data/global.h"
|
||
#include "render/window.h"
|
||
#include "render/renderapi.h"
|
||
#include "editor/window/editor_main_window.h"
|
||
#include "imgui.h"
|
||
namespace api {
|
||
void EditorModule::OnLoad(int argc, char** argv)
|
||
{
|
||
IMGUI_CHECKVERSION();
|
||
ImGui::CreateContext();
|
||
ImGuiIO& io = ImGui::GetIO();
|
||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // 可选:启用键盘导航
|
||
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // 可选:启用Docking
|
||
io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // 可选:启用多视口
|
||
ImGui::StyleColorsDark();
|
||
}
|
||
|
||
void EditorModule::OnUnload()
|
||
{
|
||
}
|
||
void EditorModule::Initialize(void)
|
||
{
|
||
EditorSystem* Editor = EditorSystem::Ptr();
|
||
Editor->AddWindow<EditorMainWindow>();
|
||
}
|
||
} |