Refine editor frame services seam

This commit is contained in:
2026-04-29 14:31:55 +08:00
parent 212d4016e0
commit 749417989a
16 changed files with 77 additions and 112 deletions

View File

@@ -2,16 +2,20 @@
#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) {
EditorUtilityWindowKind kind,
EditorColorPickerToolState& colorPickerToolState,
EditorSceneRuntime& sceneRuntime) {
switch (kind) {
case EditorUtilityWindowKind::ColorPicker:
return std::make_unique<ColorPickerPanel>();
return std::make_unique<ColorPickerPanel>(colorPickerToolState);
case EditorUtilityWindowKind::AddComponent:
return std::make_unique<AddComponentPanel>();
return std::make_unique<AddComponentPanel>(sceneRuntime);
case EditorUtilityWindowKind::None:
default:
return nullptr;