Skip to content

Commit

Permalink
update texture_atlas example to work with new image sampler api and t…
Browse files Browse the repository at this point in the history
…ext justify
  • Loading branch information
antoniacobaeus committed Dec 14, 2023
1 parent d354fa9 commit 3f56e5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/2d/texture_atlas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ fn create_texture_atlas(

// Update the sampling settings of the texture atlas
let image = textures.get_mut(&texture_atlas.texture).unwrap();
image.sampler_descriptor = sampling.unwrap_or_default();
image.sampler = sampling.unwrap_or_default();

texture_atlas
}
Expand Down Expand Up @@ -243,7 +243,7 @@ fn create_label(
text_style: TextStyle,
) {
commands.spawn(Text2dBundle {
text: Text::from_section(text, text_style).with_alignment(TextAlignment::Center),
text: Text::from_section(text, text_style).with_justify(JustifyText::Center),
transform: Transform {
translation: Vec3::new(translation.0, translation.1, translation.2),
..default()
Expand Down

0 comments on commit 3f56e5a

Please sign in to comment.