Initial claude dump
This commit is contained in:
@@ -1,32 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include <sophia/entity.hpp>
|
||||
#include <sophia/frame_info.hpp>
|
||||
#include <sophia/scene.hpp>
|
||||
#include <sophia/ui/panel.hpp>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class SceneHierarchyPanel : public sophia::Panel {
|
||||
public:
|
||||
SceneHierarchyPanel() : Panel{{.name = "Scene Hierarchy", .locked = true}} {}
|
||||
SceneHierarchyPanel(sophia::Scene& scene, sophia::Entity& selected)
|
||||
: Panel{{.name = "Scene Hierarchy", .locked = true}},
|
||||
scene{scene},
|
||||
selected{selected} {}
|
||||
|
||||
void onUpdate(const sophia::FrameInfo& frameInfo) override;
|
||||
|
||||
private:
|
||||
struct Node {
|
||||
std::string name;
|
||||
std::vector<Node> children;
|
||||
};
|
||||
|
||||
void drawNode(const Node& node);
|
||||
|
||||
std::vector<Node> nodes = {
|
||||
{"Main Camera", {}},
|
||||
{"Directional Light", {}},
|
||||
{"Ground", {}},
|
||||
{"Player", {}},
|
||||
{"Enemies", {{"Enemy_01", {}}, {"Enemy_02", {}}, {"Enemy_03", {}}}},
|
||||
{"Props", {{"Crate_01", {}}, {"Crate_02", {}}}},
|
||||
};
|
||||
|
||||
std::string selected;
|
||||
sophia::Scene& scene;
|
||||
sophia::Entity& selected;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user