refactor(editor): Complete architecture refactoring
- SceneManager: remove singleton, use dependency injection via EditorContext - SelectionManager: already interface-based via ISelectionManager - Panel: now receives IEditorContext for accessing managers - HierarchyPanel: migrated to use IEditorContext instead of singletons - Add ISceneManager interface and SceneManagerImpl - EditorContextImpl: holds all editor subsystems Architecture now follows dependency injection pattern: Application -> EditorContext -> SceneManager/SelectionManager EditorLayer -> Panels (receive context via SetContext) All Manager singletons removed: EditorSceneManager::Get(), SelectionManager::Get()
This commit is contained in:
@@ -33,6 +33,14 @@ void EditorLayer::onAttach() {
|
||||
m_consolePanel = std::make_unique<ConsolePanel>();
|
||||
m_projectPanel = std::make_unique<ProjectPanel>();
|
||||
|
||||
m_menuBar->SetContext(m_context.get());
|
||||
m_hierarchyPanel->SetContext(m_context.get());
|
||||
m_sceneViewPanel->SetContext(m_context.get());
|
||||
m_gameViewPanel->SetContext(m_context.get());
|
||||
m_inspectorPanel->SetContext(m_context.get());
|
||||
m_consolePanel->SetContext(m_context.get());
|
||||
m_projectPanel->SetContext(m_context.get());
|
||||
|
||||
m_menuBar->OnAttach();
|
||||
m_hierarchyPanel->OnAttach();
|
||||
m_sceneViewPanel->OnAttach();
|
||||
|
||||
Reference in New Issue
Block a user