Skip to main content

step_background_transitions

Function step_background_transitions 

Source
pub fn step_background_transitions(
    commands: Commands<'_, '_>,
    tick: Res<'_, Tick>,
    anim: Res<'_, AnimationsActive>,
    q: Query<'_, '_, (Entity, &BackgroundTransition, &mut Visuals, Option<&Visible>, Option<&StyleOverrides>)>,
)
Expand description

Sample every active BackgroundTransition into the entity’s solid Visuals::fill. Gradient fills are never animated (the component is dropped on sight). A fill some runtime system holds in StyleOverrides (a hover or press tint, a toggle’s state) is that system’s to paint, so the restyle tween is retired rather than left to fight over the colour.