Skip to main content

reconcile_error_banner

Function reconcile_error_banner 

Source
pub fn reconcile_error_banner(
    commands: Commands<'_, '_>,
    banner: Res<'_, ErrorBanner>,
    existing: Query<'_, '_, (Entity, Option<&mut TextContent>), With<ErrorBannerMarker>>,
)
Expand description

Reconcile the on-screen banner against ErrorBanner:

  • banner present, no entity -> spawn an absolute-positioned red strip with the message at the top of the viewport.
  • banner present, entity exists -> patch the message in place.
  • banner cleared, entity exists -> despawn.

Runs in TickStage::Systems so the layout pass picks the banner’s new style up the same tick it spawns.