1
0

imgui_system.cpp 678 B

12345678910111213141516171819202122232425
  1. #include <component/input_listener_component.h>
  2. #include <component/rect_component.h>
  3. #include <component/renderable_component.h>
  4. #include <entt/entity/registry.hpp>
  5. #include <entt/tools/davey.hpp>
  6. #include <imgui.h>
  7. #include <system/imgui_system.h>
  8. namespace testbed {
  9. void imgui_system(const entt::registry &registry) {
  10. ImGui::Begin("Davey - registry");
  11. entt::davey(registry);
  12. ImGui::End();
  13. ImGui::Begin("Davey - view");
  14. entt::davey(registry.view<renderable_component, rect_component>());
  15. ImGui::End();
  16. ImGui::Begin("Davey - storage");
  17. entt::davey(*registry.storage<input_listener_component>());
  18. ImGui::End();
  19. }
  20. } // namespace testbed