zengine/engine/src/editor/editor.cpp

27 lines
776 B
C++
Raw Normal View History

2024-11-27 22:33:09 +08:00
#include "editor/editor.h"
2024-12-07 18:10:01 +08:00
#include "data/global.h"
2024-12-08 23:00:39 +08:00
#include "render/window.h"
#include "render/renderapi.h"
2024-12-17 20:57:52 +08:00
#include "editor/window/editor_main_window.h"
2024-12-12 22:20:56 +08:00
#include "imgui.h"
2024-11-27 22:33:09 +08:00
namespace api {
void EditorModule::OnLoad(int argc, char** argv)
{
2024-12-12 22:20:56 +08:00
IMGUI_CHECKVERSION();
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO();
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // 可选:启用键盘导航
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // 可选启用Docking
io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // 可选:启用多视口
ImGui::StyleColorsDark();
2024-11-27 22:33:09 +08:00
}
void EditorModule::OnUnload()
{
}
2024-12-07 18:10:01 +08:00
void EditorModule::Initialize(void)
{
2024-12-17 20:57:52 +08:00
EditorSystem* Editor = EditorSystem::Ptr();
Editor->AddWindow<EditorMainWindow>();
2024-12-07 18:10:01 +08:00
}
2024-11-27 22:33:09 +08:00
}