Editor: UI panels and GameObject updates

This commit is contained in:
2026-03-25 01:23:08 +08:00
parent dc970d215b
commit c9e459c179
21 changed files with 651 additions and 184 deletions

View File

@@ -0,0 +1,48 @@
#pragma once
#include <XCEngine/Core/Layer.h>
#include <XCEngine/Core/LayerStack.h>
#include <memory>
#include <string>
namespace XCEngine {
namespace Editor {
class MenuBar;
class HierarchyPanel;
class SceneViewPanel;
class GameViewPanel;
class InspectorPanel;
class ConsolePanel;
class ProjectPanel;
class EditorLayer : public Core::Layer {
public:
EditorLayer();
~EditorLayer() override = default;
void onAttach() override;
void onDetach() override;
void onUpdate(float dt) override;
void onEvent(void* event) override;
void onImGuiRender() override;
void SetProjectPath(const std::string& path);
private:
void setupDockspace();
void renderAllPanels();
std::string m_projectPath;
std::unique_ptr<MenuBar> m_menuBar;
std::unique_ptr<HierarchyPanel> m_hierarchyPanel;
std::unique_ptr<SceneViewPanel> m_sceneViewPanel;
std::unique_ptr<GameViewPanel> m_gameViewPanel;
std::unique_ptr<InspectorPanel> m_inspectorPanel;
std::unique_ptr<ConsolePanel> m_consolePanel;
std::unique_ptr<ProjectPanel> m_projectPanel;
};
}
}