Refactor editor rendering contracts
This commit is contained in:
@@ -7,8 +7,6 @@
|
||||
#include "Project/ProjectPanel.h"
|
||||
#include "Scene/SceneEditCommandRoute.h"
|
||||
#include "Scene/SceneViewportFeature.h"
|
||||
#include "Assets/BuiltInIcons.h"
|
||||
#include "Viewport/ViewportHostService.h"
|
||||
|
||||
#include <XCEditor/Panels/UIEditorHostedPanelDispatch.h>
|
||||
|
||||
@@ -219,7 +217,7 @@ public:
|
||||
}
|
||||
|
||||
void Initialize(const EditorWorkspacePanelInitializationContext& context) override {
|
||||
m_panel.SetBuiltInIcons(&context.builtInIcons);
|
||||
m_panel.SetIconService(&context.iconService);
|
||||
m_panel.SetTextMeasurer(&context.textMeasurer);
|
||||
m_panel.Initialize();
|
||||
}
|
||||
@@ -330,7 +328,7 @@ public:
|
||||
}
|
||||
|
||||
void Initialize(const EditorWorkspacePanelInitializationContext& context) override {
|
||||
m_panel.SetBuiltInIcons(&context.builtInIcons);
|
||||
m_panel.SetIconService(&context.iconService);
|
||||
m_panel.SetTextMeasurer(&context.textMeasurer);
|
||||
}
|
||||
|
||||
@@ -406,15 +404,16 @@ public:
|
||||
}
|
||||
|
||||
void Initialize(const EditorWorkspacePanelInitializationContext& context) override {
|
||||
m_feature.Initialize(
|
||||
context.repoRoot,
|
||||
context.textureHost,
|
||||
&context.builtInIcons,
|
||||
context.viewportHostService);
|
||||
if (context.sceneViewportRuntime != nullptr) {
|
||||
m_feature.Initialize(
|
||||
&context.iconService,
|
||||
*context.sceneViewportRuntime);
|
||||
}
|
||||
}
|
||||
|
||||
void Shutdown(const EditorWorkspacePanelShutdownContext& context) override {
|
||||
m_feature.Shutdown(context.textureHost, context.viewportHostService);
|
||||
(void)context;
|
||||
m_feature.Shutdown();
|
||||
m_commandRoute.BindSceneRuntime(nullptr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user