重构架构:引入EventSystem、EntityID、SelectionManager
- 新增 Event 系统,支持面板间解耦通信 - 用 EntityID 替代裸指针,解决悬空指针问题 - 拆分 SelectionManager 管理选择状态 - SceneManager 使用 EntityID 和 unordered_map 存储 - HierarchyPanel/InspectorPanel 使用事件系统
This commit is contained in:
@@ -1,17 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "Panel.h"
|
||||
#include "Core/Event.h"
|
||||
#include "Core/GameObject.h"
|
||||
|
||||
namespace UI {
|
||||
|
||||
class InspectorPanel : public Panel {
|
||||
public:
|
||||
InspectorPanel();
|
||||
~InspectorPanel();
|
||||
|
||||
void Render() override;
|
||||
|
||||
private:
|
||||
void RenderTransformSection(class TransformComponent* transform);
|
||||
void RenderMeshRendererSection(class MeshRendererComponent* meshRenderer);
|
||||
void RenderEntity(Entity* entity);
|
||||
void RenderComponent(Component* component);
|
||||
|
||||
Event<EntityID>::HandlerID m_selectionHandlerId = 0;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user