Files
Hazel/Sandbox/src/Editor/Panels/SceneHierachyPanel.h

37 lines
727 B
C++

//
// Created by sfd on 25-5-29.
//
#ifndef SCENEHIERACHYPANEL_H
#define SCENEHIERACHYPANEL_H
#include <Hazel/Core/Core.h>
#include <Hazel/Scene/Entity.h>
#include <Hazel/Scene/Scene.h>
namespace Hazel
{
class SceneHierachyPanel
{
public:
SceneHierachyPanel() = default;
SceneHierachyPanel(const Ref<Scene>& context);
void SetContext(const Ref<Scene>& context);
void OnImGuiRender();
void DrawComponents(Entity entity);
Entity GetSelectedEntity() const { return m_SelectionContext; }
private:
void DrawEntityNode(Entity entity);
private:
Ref<Scene> m_Context;
Entity m_SelectionContext;
};
}
#endif //SCENEHIERACHYPANEL_H