detect_text_needs_rerender

Function detect_text_needs_rerender 

Source
pub fn detect_text_needs_rerender<Root>(
    changed_roots: Query<'_, '_, Entity, (Or<(Changed<Root>, Changed<TextFont>, Changed<TextLayout>, Changed<Children>)>, With<Root>, With<TextFont>, With<TextLayout>)>,
    changed_spans: Query<'_, '_, (Entity, Option<&ChildOf>, Has<TextLayout>), (Or<(Changed<TextSpan>, Changed<TextFont>, Changed<Children>, Changed<ChildOf>, Added<TextLayout>)>, With<TextSpan>, With<TextFont>)>,
    computed: Query<'_, '_, (Option<&ChildOf>, Option<&mut ComputedTextBlock>, Has<TextSpan>)>,
)
where Root: Component,
Expand description

System that detects changes to text blocks and sets ComputedTextBlock::should_rerender.

Generic over the root text component and text span component. For example, Text2d/TextSpan for 2d or Text/TextSpan for UI.