File tree 1 file changed +10
-7
lines changed
1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ fn setup(
34
34
mut commands : Commands ,
35
35
mut meshes : ResMut < Assets < Mesh > > ,
36
36
mut materials : ResMut < Assets < StandardMaterial > > ,
37
+ asset_server : Res < AssetServer > ,
37
38
) {
38
39
let base_color = Color :: rgba ( 0.9 , 0.2 , 0.3 , 1.0 ) ;
39
40
let icosphere_mesh = meshes. add (
@@ -185,15 +186,15 @@ fn setup(
185
186
186
187
// Controls Text
187
188
let text_style = TextStyle {
189
+ font : asset_server. load ( "fonts/FiraMono-Medium.ttf" ) ,
188
190
font_size : 18.0 ,
189
191
color : Color :: BLACK ,
190
- ..default ( )
191
192
} ;
192
193
193
194
let label_text_style = TextStyle {
195
+ font : asset_server. load ( "fonts/FiraMono-Medium.ttf" ) ,
194
196
font_size : 25.0 ,
195
197
color : Color :: ORANGE ,
196
- ..default ( )
197
198
} ;
198
199
199
200
commands. spawn (
@@ -233,11 +234,13 @@ fn setup(
233
234
) )
234
235
. with_children ( |parent| {
235
236
parent. spawn (
236
- TextBundle :: from_section ( label, label_text_style. clone ( ) ) . with_style ( Style {
237
- position_type : PositionType :: Absolute ,
238
- bottom : Val :: Px ( 0. ) ,
239
- ..default ( )
240
- } ) ,
237
+ TextBundle :: from_section ( label, label_text_style. clone ( ) )
238
+ . with_style ( Style {
239
+ position_type : PositionType :: Absolute ,
240
+ bottom : Val :: Px ( 0. ) ,
241
+ ..default ( )
242
+ } )
243
+ . with_no_wrap ( ) ,
241
244
) ;
242
245
} ) ;
243
246
} ;
You can’t perform that action at this time.
0 commit comments