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

27 lines
833 B
C++

#include "EditorUtilityWindowRegistry.h"
#include "ColorPicker/ColorPickerPanel.h"
#include "Inspector/AddComponentPanel.h"
#include "Scene/EditorSceneRuntime.h"
#include "State/EditorColorPickerToolState.h"
namespace XCEngine::UI::Editor::App {
std::unique_ptr<EditorUtilityWindowPanel> CreateEditorUtilityWindowPanel(
EditorUtilityWindowKind kind,
EditorColorPickerToolState& colorPickerToolState,
EditorSceneRuntime& sceneRuntime) {
switch (kind) {
case EditorUtilityWindowKind::ColorPicker:
return std::make_unique<ColorPickerPanel>(colorPickerToolState);
case EditorUtilityWindowKind::AddComponent:
return std::make_unique<AddComponentPanel>(sceneRuntime);
case EditorUtilityWindowKind::None:
default:
return nullptr;
}
}
} // namespace XCEngine::UI::Editor::App