pub struct HudLayers(pub BTreeMap<AssetId, i32>);Expand description
Per-frame draw-layer overrides for HUD Sprites / TextLabels / TextInputs, keyed
by asset id and published by the cn editor HUD so its floating panels occlude
cleanly. Overlay draw calls render in two passes (all sprites, then all text),
so two overlapping panels’ contents merge – one panel’s text draws over the
other’s background. GraphicsSystem stable-sorts the overlay calls by this layer
(higher draws on top) when the map is non-empty, so the focused panel’s whole
content sits above the others’. An id absent from the map is layer 0; an empty /
absent resource (the shipped runtime) leaves draw order at insertion order,
unchanged.
Tuple Fields§
§0: BTreeMap<AssetId, i32>Trait Implementations§
Auto Trait Implementations§
impl Freeze for HudLayers
impl RefUnwindSafe for HudLayers
impl Send for HudLayers
impl Sync for HudLayers
impl Unpin for HudLayers
impl UnsafeUnpin for HudLayers
impl UnwindSafe for HudLayers
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more