From 001f00299c1d0cb0c251e3f0ff40550ac185726e Mon Sep 17 00:00:00 2001 From: tigregalis Date: Sun, 24 Jan 2021 19:26:14 +0800 Subject: [PATCH] fixed text not compiling in alien_cake_addict example --- examples/game/alien_cake_addict.rs | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/examples/game/alien_cake_addict.rs b/examples/game/alien_cake_addict.rs index 9468fd714ff17..34ec530dc5ce8 100644 --- a/examples/game/alien_cake_addict.rs +++ b/examples/game/alien_cake_addict.rs @@ -152,15 +152,15 @@ fn setup(commands: &mut Commands, asset_server: Res, mut game: ResM // scoreboard commands.spawn(TextBundle { - text: Text { - font: asset_server.load("fonts/FiraSans-Bold.ttf"), - value: "Score:".to_string(), - style: TextStyle { - color: Color::rgb(0.5, 0.5, 1.0), + text: Text::with_section( + "Score:", + TextStyle { + font: asset_server.load("fonts/FiraSans-Bold.ttf"), font_size: 40.0, - ..Default::default() + color: Color::rgb(0.5, 0.5, 1.0), }, - }, + Default::default(), + ), style: Style { position_type: PositionType::Absolute, position: Rect { @@ -338,7 +338,7 @@ fn rotate_bonus(game: Res, time: Res