Skip to main content

Module display

Module display 

Source
Expand description

Display heuristics — icon, type tag, category labels for the Inspector.

Pure functions over InspectedEntity / domain tag — no state. Component authors that want a different icon / tag for their type can extend the match arms here (or, in a later iteration, register through the inventory registry that already carries per-component metadata).

Functions§

category_label_for_tag
Add-Component menu sub-header label per domain tag.
icon_for_domain_tag
Per-domain card icon. Domain tags come from the macro-generated ComponentRegistration::domain field.
pick_icon
Picks an Inspector header icon based on the most “interesting” component on the entity. The fallback is a cube (mesh-like).
pick_type_tag
Picks a short type tag for the Inspector meta row.