Files
XCEngine/editor/app/Features/EditorUtilityWindowRegistry.cpp

27 lines
833 B
C++
Raw Normal View History

2026-04-27 19:16:08 +08:00
#include "EditorUtilityWindowRegistry.h"
2026-04-27 19:16:08 +08:00
#include "ColorPicker/ColorPickerPanel.h"
#include "Inspector/AddComponentPanel.h"
2026-04-29 14:31:55 +08:00
#include "Scene/EditorSceneRuntime.h"
#include "State/EditorColorPickerToolState.h"
namespace XCEngine::UI::Editor::App {
std::unique_ptr<EditorUtilityWindowPanel> CreateEditorUtilityWindowPanel(
2026-04-29 14:31:55 +08:00
EditorUtilityWindowKind kind,
EditorColorPickerToolState& colorPickerToolState,
EditorSceneRuntime& sceneRuntime) {
switch (kind) {
case EditorUtilityWindowKind::ColorPicker:
2026-04-29 14:31:55 +08:00
return std::make_unique<ColorPickerPanel>(colorPickerToolState);
case EditorUtilityWindowKind::AddComponent:
2026-04-29 14:31:55 +08:00
return std::make_unique<AddComponentPanel>(sceneRuntime);
case EditorUtilityWindowKind::None:
default:
return nullptr;
}
}
} // namespace XCEngine::UI::Editor::App