Skip to main content

Module add_component

Module add_component 

Source
Expand description

“+ Add Component” menu — bucketed by SemanticDomain (live World).

Walks the inventory of ComponentRegistration to enumerate every component the engine knows about, filters out inherent-on-vessel components plus those already on the entity, and groups what’s left by domain tag.

Constants§

SURFACED_ELSEWHERE
Components the editor renders somewhere other than as an inspector card, so offering them in “+ Add Component” would be redundant.
UI_DOMAIN_TAG 🔒
SemanticDomain::Ui as the small integer tag the editor carries in [ComponentJson::domain] (see ops::domain_tag).

Functions§

is_author_facing
Whether the inspector should treat type_name as the author’s own data — offering it in “+ Add Component” and rendering it as an editable card.
render_add_component
Render the “+ Add Component” menu button. Selecting a component queues EditorState::pending_add_component for the next frame.