Skip to content

Commit

Permalink
update to entt v3.12.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Green-Sky committed Sep 7, 2023
1 parent 65303ff commit 88c6df8
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions imgui_entt_entity_editor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class EntityEditor {
for (auto &&curr: registry.storage()) {
if (auto &storage = curr.second; storage.contains(old_e)) {
// TODO: do something with the return value. returns false on failure.
storage.emplace(e, storage.get(old_e));
storage.push(e, storage.value(old_e));
}
}
}
Expand Down Expand Up @@ -237,11 +237,11 @@ class EntityEditor {

if (comp_list.empty()) {
ImGui::Text("Orphans:");
registry.each([&registry](auto e){
for (EntityType e : registry.template storage<EntityType>()) {
if (registry.orphan(e)) {
MM_IEEE_ENTITY_WIDGET(e, registry, false);
}
});
}
} else {
entt::runtime_view view{};
for (const auto type : comp_list) {
Expand All @@ -264,17 +264,6 @@ class EntityEditor {
}
}

[[deprecated("Use renderEditor() instead. And manage the window yourself.")]]
void render(Registry& registry, EntityType& e)
{
if (show_window) {
if (ImGui::Begin("Entity Editor", &show_window)) {
renderEditor(registry, e);
}
ImGui::End();
}
}

// displays both, editor and list
// uses static internally, use only as a quick way to get going!
void renderSimpleCombo(Registry& registry, EntityType& e)
Expand Down

0 comments on commit 88c6df8

Please sign in to comment.