- 新增 Event 系统,支持面板间解耦通信 - 用 EntityID 替代裸指针,解决悬空指针问题 - 拆分 SelectionManager 管理选择状态 - SceneManager 使用 EntityID 和 unordered_map 存储 - HierarchyPanel/InspectorPanel 使用事件系统
23 lines
391 B
C++
23 lines
391 B
C++
#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 RenderEntity(Entity* entity);
|
|
void RenderComponent(Component* component);
|
|
|
|
Event<EntityID>::HandlerID m_selectionHandlerId = 0;
|
|
};
|
|
|
|
} |