add ieee for object inspection

This commit is contained in:
2024-04-30 19:44:06 +02:00
parent b8132afabb
commit 471fac409e
8 changed files with 388 additions and 25 deletions

38
src/object_store_ui.cpp Normal file
View File

@@ -0,0 +1,38 @@
#include "./object_store_ui.hpp"
#include <solanaceae/object_store/meta_components.hpp>
#include <imgui/imgui.h>
ObjectStoreUI::ObjectStoreUI(
ObjectStore2& os
) : _os(os) {
_ee.show_window = false;
_ee.registerComponent<ObjectStore::Components::ID>("ID");
_ee.registerComponent<ObjectStore::Components::DataCompressionType>("DataCompressionType");
}
void ObjectStoreUI::render(void) {
{ // main window menubar injection
// assumes the window "tomato" was rendered already by cg
if (ImGui::Begin("tomato")) {
if (ImGui::BeginMenuBar()) {
ImGui::Separator();
if (ImGui::BeginMenu("ObjectStore")) {
if (ImGui::MenuItem("Inspector")) {
//_show_add_friend_window = true;
_ee.show_window = true;
}
ImGui::EndMenu();
}
ImGui::EndMenuBar();
}
}
ImGui::End();
}
static Object selected_ent {entt::null};
_ee.renderSimpleCombo(_os.registry(), selected_ent);
}