progress...

This commit is contained in:
2021-08-16 21:37:09 +02:00
parent 4927720c29
commit a53db1e7b4
17 changed files with 210 additions and 89 deletions

View File

@@ -0,0 +1,31 @@
#include "EntityWindow.h"
#include "../Entity.h"
#include <imgui.h>
Imgui::EntityWindow::EntityWindow(const std::vector<ModelEntity *> &entities) : Window("Entities"), m_entites(entities)
{}
void Imgui::EntityWindow::addWidgets()
{
ImGui::Text("Treelist");
for (const auto &entity : m_entites) {
// addChildWidget(*entity);
}
}
void Imgui::EntityWindow::addChildWidget(const ModelEntity &entity)
{
if (entity.getChildren().empty()) {
ImGui::Text(entity.getUniqueName().c_str());
} else {
if (ImGui::TreeNode(entity.getUniqueName().c_str())) {
for (const auto &child : entity.getChildren()) {
addChildWidget(*(const ModelEntity *)child);
}
ImGui::TreePop();
ImGui::Separator();
}
}
}