-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
enhancementaccepted requests, sooner or later I'll do itaccepted requests, sooner or later I'll do itsolvedavailable upstream or in a branchavailable upstream or in a branch
Description
struct Base
{
int x;
};
struct Derived : public Base
{
char y;
};
entt::meta_factory<Base>{}.data<&Base::x>("x");
entt::meta_factory<Derived>{}.base<Base>();
when calling davey on a registry with that Derived component, i would expect it to display both the x and y when displaying a Derived. But it only checks the .data() meta members on Derived, which is an empty list. It should check both the members of Derived, and also "recurse" down any base classes.
I.E. here:
if(const auto obj = type.from_void(storage.value(entt)); obj) {
present_element<Entity>(obj, [&ctx, from, to](const char *name, const Entity other) {
if(ImGui::TreeNode(name, "%s: %d [%d/%d]", name, to_integral(other), to_entity(other), to_version(other))) {
present_entity<Entity>(ctx, other, from, to);
ImGui::TreePop();
}
});
}
If type has a .base(), it should call present_element on that first.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementaccepted requests, sooner or later I'll do itaccepted requests, sooner or later I'll do itsolvedavailable upstream or in a branchavailable upstream or in a branch