Function bevy_ui::widget::text_system
source · pub fn text_system(
textures: ResMut<'_, Assets<Image>>,
last_scale_factor: Local<'_, f32>,
fonts: Res<'_, Assets<Font>>,
windows: Query<'_, '_, &Window, With<PrimaryWindow>>,
text_settings: Res<'_, TextSettings>,
ui_scale: Res<'_, UiScale>,
texture_atlases: ResMut<'_, Assets<TextureAtlasLayout>>,
font_atlas_sets: ResMut<'_, FontAtlasSets>,
text_pipeline: ResMut<'_, TextPipeline>,
text_query: Query<'_, '_, (Ref<'_, Node>, &Text, &mut TextLayoutInfo, &mut TextFlags)>
)
Expand description
Updates the layout and size information for a UI text node on changes to the size value of its Node
component,
or when the needs_recompute
field of TextFlags
is set to true.
This information is computed by the TextPipeline
and then stored in TextLayoutInfo
.
World Resources
ResMut<Assets<Image>>
– This system only adds new Image
assets.
It does not modify or observe existing ones. The exception is when adding new glyphs to a bevy_text::FontAtlas
.