重构UI架构:分离数据模型和显示逻辑

- 新增 Core 模块:GameObject、LogEntry、AssetItem 数据模型
- 新增 Managers 模块:SceneManager、LogSystem、ProjectManager
- Panel 层只负责显示,不再持有数据
- 解耦 HierarchyPanel 和 InspectorPanel 之间的直接依赖
This commit is contained in:
2026-03-12 16:13:34 +08:00
parent 7d3e3b464d
commit a2f3db8718
19 changed files with 306 additions and 137 deletions

View File

@@ -1,7 +1,6 @@
#pragma once
#include "Panel.h"
#include "HierarchyPanel.h"
namespace UI {
@@ -9,17 +8,10 @@ class InspectorPanel : public Panel {
public:
InspectorPanel();
void Render() override;
void SetHierarchyPanel(HierarchyPanel* panel) { m_hierarchyPanel = panel; }
private:
void RenderTransformSection();
void RenderMeshRendererSection();
HierarchyPanel* m_hierarchyPanel = nullptr;
float m_position[3] = {0.0f, 1.0f, -10.0f};
float m_rotation[3] = {0.0f, 0.0f, 0.0f};
float m_scale[3] = {1.0f, 1.0f, 1.0f};
void RenderTransformSection(class TransformComponent* transform);
void RenderMeshRendererSection(class MeshRendererComponent* meshRenderer);
};
}