editor: centralize engine runtime access

This commit is contained in:
2026-04-28 17:23:10 +08:00
parent 23aab98a09
commit 357dc136fe
36 changed files with 337 additions and 102 deletions

View File

@@ -21,6 +21,7 @@ namespace XCEngine::UI::Editor::App {
EditorWindowManager::EditorWindowManager(
EditorFrameServices& frameServices,
EditorEngineServices& engineServices,
EditorWindowSystem& windowSystem,
Rendering::Host::EditorWindowRenderRuntimeFactory& renderRuntimeFactory,
Host::EditorHostResourceService& resourceService,
@@ -28,6 +29,7 @@ EditorWindowManager::EditorWindowManager(
EditorWorkspaceShellRuntimeFactory workspaceShellRuntimeFactory,
EditorUtilityWindowPanelFactory utilityPanelFactory)
: m_frameServices(frameServices)
, m_engineServices(engineServices)
, m_renderRuntimeFactory(renderRuntimeFactory)
, m_resourceService(resourceService)
, m_hostRuntime(hostRuntime) {
@@ -79,6 +81,7 @@ EditorHostWindow* EditorWindowManager::CreateWorkspaceWindow(
params.primary,
std::make_unique<EditorWindowRuntimeController>(
m_frameServices,
m_engineServices,
m_resourceService,
m_contentFactory->CreateWorkspaceContentController(windowState),
m_renderRuntimeFactory.CreateWindowRenderRuntime()));
@@ -108,6 +111,7 @@ EditorHostWindow* EditorWindowManager::CreateUtilityWindow(
params.primary,
std::make_unique<EditorWindowRuntimeController>(
m_frameServices,
m_engineServices,
m_resourceService,
m_contentFactory->CreateUtilityContentController(descriptor),
m_renderRuntimeFactory.CreateWindowRenderRuntime()));