Elevate Engine 1
Loading...
Searching...
No Matches
AnalyserPanel.h
Go to the documentation of this file.
1#pragma once
2
3#ifdef EE_EDITOR_BUILD
4
9
10namespace Elevate
11{
12 class Component;
13 class Texture;
14}
15
16namespace Elevate::Editor
17{
18 class AnalyserPanel : public EditorWidget
19 {
20 public:
21 void OnImGuiRender() override;
22 private:
23 void RenderComponent(Component* component);
24 void RenderComponentLayout(const ComponentLayout& layout, Component* component = nullptr);
25 void RenderField(const ComponentField& field) const;
26
27 // TODO MOVE SOMEWHERE ELSE !!!! (ALL THE FOLLOWING UNDERNEATH)
28 struct CategoryMenu
29 {
30 EECategory category;
31 std::vector<ComponentRegistry::Entry> items;
32
33 std::vector<CategoryMenu> childs;
34 };
35 void InsertCategory(CategoryMenu& root, const ComponentRegistry::Entry& entry);
36 void DrawCategoryChildren(const CategoryMenu& category, std::weak_ptr<GameObject> obj);
37 void DrawCategoryMenu(const CategoryMenu& menu, std::weak_ptr<GameObject> obj);
38
39 std::vector<std::type_index> m_alredyAddedComponents;
40
41 std::map<Component*, const void*> m_textureCache;
42 };
43}
44
45#endif // EE_EDITOR_BUILD