Menu text & raw character colors

This commit is contained in:
Pascal Engélibert 2022-08-21 23:46:07 +02:00
commit 55278858cb
Signed by: tuxmain
GPG key ID: 3504BC6D362F7DCA
2 changed files with 49 additions and 36 deletions

View file

@ -19,13 +19,29 @@ impl Plugin for MenuPlugin {
}
fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
let font = asset_server.get_handle("Cantarell-VF.otf");
commands
.spawn_bundle(Text2dBundle {
text: Text::from_section(
"BEVYJAM",
TextStyle {
font: font.clone(),
font_size: 48.0,
color: Color::WHITE,
},
)
.with_alignment(TextAlignment::CENTER),
transform: Transform::from_xyz(0., -128.0, 0.),
..Default::default()
})
.insert(Menu());
commands
.spawn_bundle(Text2dBundle {
text: Text::from_section(
"Press ENTER",
TextStyle {
font: asset_server.get_handle("Cantarell-VF.otf"),
font_size: 64.0,
font,
font_size: 32.0,
color: Color::WHITE,
},
)