diff --git a/src/entt/tools/davey.hpp b/src/entt/tools/davey.hpp index fe33283ba..7d7d75320 100644 --- a/src/entt/tools/davey.hpp +++ b/src/entt/tools/davey.hpp @@ -131,6 +131,10 @@ static void present_element(const meta_any &obj, OnEntity on_entity) { ImGui::Text("%s: %s", label, underlying_type.data()); } } + + for([[maybe_unused]] const auto [id, base]: obj.type().base()) { + present_element(obj.allow_cast(base.type()), on_entity); + } } template diff --git a/testbed/meta/meta.cpp b/testbed/meta/meta.cpp index 246992397..16943e66f 100644 --- a/testbed/meta/meta.cpp +++ b/testbed/meta/meta.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -8,6 +9,18 @@ namespace testbed { void meta_setup() { + entt::meta_factory() + .type("sdl_fpoint") + .data<&SDL_FPoint::x>("x") + .data<&SDL_FPoint::y>("y"); + + entt::meta_factory() + .type("sdl_frect") + .data<&SDL_FRect::x>("x") + .data<&SDL_FRect::y>("y") + .data<&SDL_FRect::w>("w") + .data<&SDL_FRect::h>("h"); + entt::meta_factory() .type("command type") .data("up") @@ -19,17 +32,16 @@ void meta_setup() { .type("input listener") .data<&input_listener_component::command>("command"); + entt::meta_factory() + .type("point"); + entt::meta_factory() .type("position") - .data<&SDL_FPoint::x>("x") - .data<&SDL_FPoint::y>("y"); + .base(); entt::meta_factory() .type("rect") - .data<&SDL_FRect::x>("x") - .data<&SDL_FRect::y>("y") - .data<&SDL_FRect::w>("w") - .data<&SDL_FRect::h>("h"); + .base(); entt::meta_factory() .type("renderable");