Skip to content

Commit 99081c2

Browse files
committed
Fix imports
1 parent abe257d commit 99081c2

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

crates/bevy_text/src/text.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ impl Text {
1919
/// ```
2020
/// # use bevy_asset::{AssetServer, Handle};
2121
/// # use bevy_render::color::Color;
22-
/// # use bevy_text::{Font, Text, TextAlignment, TextStyle};
23-
/// # use glyph_brush_layout::{HorizontalAlign, VerticalAlign};
22+
/// # use bevy_text::{Font, Text, TextAlignment, TextStyle, HorizontalAlign, VerticalAlign};
2423
/// #
2524
/// # let font_handle: Handle<Font> = Default::default();
2625
/// #

crates/bevy_text/src/text2d.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ use bevy_render::{
1111
use bevy_sprite::{TextureAtlas, QUAD_HANDLE};
1212
use bevy_transform::prelude::{GlobalTransform, Transform};
1313
use bevy_window::Windows;
14-
use glyph_brush_layout::{HorizontalAlign, VerticalAlign};
1514

1615
use crate::{
17-
CalculatedSize, DefaultTextPipeline, DrawableText, Font, FontAtlasSet, Text, TextError,
16+
CalculatedSize, DefaultTextPipeline, DrawableText, Font, FontAtlasSet, HorizontalAlign, Text,
17+
TextError, VerticalAlign,
1818
};
1919

2020
/// The bundle of components needed to draw text in a 2D scene via the Camera2dBundle.
@@ -90,12 +90,12 @@ pub fn draw_text2d_system(
9090

9191
if let Some(text_glyphs) = text_pipeline.get_glyphs(&entity) {
9292
let position = global_transform.translation
93-
+ match text.alignment.vertical.into() {
93+
+ match text.alignment.vertical {
9494
VerticalAlign::Top => Vec3::zero(),
9595
VerticalAlign::Center => Vec3::new(0.0, -height * 0.5, 0.0),
9696
VerticalAlign::Bottom => Vec3::new(0.0, -height, 0.0),
9797
}
98-
+ match text.alignment.horizontal.into() {
98+
+ match text.alignment.horizontal {
9999
HorizontalAlign::Left => Vec3::new(-width, 0.0, 0.0),
100100
HorizontalAlign::Center => Vec3::new(-width * 0.5, 0.0, 0.0),
101101
HorizontalAlign::Right => Vec3::zero(),

0 commit comments

Comments
 (0)