feat(ecs): Scene::AddComponentRaw + InspectorPanel Add Component popup - #757
Merged
JeanPhilippeKernel merged 3 commits intoSep 6, 2026
Merged
Conversation
jnyfah
marked this pull request as ready for review
September 5, 2026 22:02
Move "+ Add Component" from below the component list into the actor header next to the name field, matching the reference layout. The relocated button sits flush against the panel's right edge, which exposed a real bug: ZUIOpenPopup defaults to opening at the click position with no edge clamping, so the popup's component list was clipped off the window's right edge. Anchor it leftward from the button's own screen position instead, same pattern ZUIBeginCombo already uses for its dropdown.
2 tasks
JeanPhilippeKernel
approved these changes
Sep 6, 2026
JeanPhilippeKernel
merged commit Sep 6, 2026
18d1512
into
JeanPhilippeKernel:develop
17 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Scene::AddComponentRaw— type-erased, size/align-validated component addition, backed by a newIComponentStorage::AddRawvirtual and a per-componentComponentMeta::Addfactory pointer registered on all 8 built-in components.InspectorPanel— a button in the actor header opens a popup listing every registered component type not already on the selected actor, driven entirely byComponentReflectionRegistry::ForEach; selecting one callsScene::AddComponentRaw.ComponentReflectionTest.cpp: default-member-initializer semantics (not memset-zero — a zeroedScalewould make actors invisible), duplicate-add no-ops, dead-entity/unknown-type guards, sentinel-field preservation, and size/align validation.Test plan
ZEngineTestsbuilds and passes viactest, including the 8 newReflectionSceneFixturecasesCloses #704
Closes #706