TazGraph Project v0.1.0
Loading...
Searching...
No Matches
EntityComponentsControl.h
1#pragma once
2
3#include "../../../UIElement.h"
4#include "../../PythonInterpreterPanel/PythonInterpreterPanel.h"
5
7 IScene* scene;
8 std::vector<EntityID> displayedEntityIds;
9 int selectedGroup = -1;
10};
11
13{
14private:
16
17 std::vector<Entity*> displayedEntities;
18
19public:
20 EntityComponentsControlPanel(bool usePython) {
21 if (usePython) {
22 addUIComponent<PythonInterpreterPanel>();
23 }
24 }
25
26 void setConfig(const EntityComponentsConfig& cfg) {
27 config = cfg;
28 displayedEntities = config.selectedGroup != -1 ?
29 config.scene->manager->getGroup_All(config.selectedGroup)
30 : config.scene->manager->getEntities_FromIds(config.displayedEntityIds);
31 }
32
33 void OnImGuiRender() override;
34 void ComponentCheckbox(std::string c);
35};
Definition EntityComponentsControl.h:13
Definition IScene.h:25
Definition UIElement.h:16
Definition EntityComponentsControl.h:6