Made flap/rewind buttons bigger

main
Elijah Voigt 2 months ago
parent 583b7a41c7
commit 272543eff6

@ -536,7 +536,7 @@ fn init_ui(mut commands: Commands) {
..default()
},
PlayerState::Pause,
children![Text::new("Go!")],
Text::new("PAUSED"),
));
commands
@ -544,26 +544,46 @@ fn init_ui(mut commands: Commands) {
align_self: AlignSelf::End,
justify_self: JustifySelf::Center,
flex_direction: FlexDirection::Row,
justify_content: JustifyContent::SpaceEvenly,
width: Val::Percent(100.0),
min_height: Val::Percent(10.0),
..default()
})
.with_children(|parent| {
parent
.spawn((
Node { ..default() },
Node {
width: Val::Percent(50.0),
align_items: AlignItems::Center,
justify_content: JustifyContent::Center,
..default()
},
Button,
BackgroundColor::default(),
RewindButton,
children![Text::new("Rewind!"),],
children![
Text::new("Rewind!"),
TextLayout::new_with_justify(JustifyText::Center)
],
))
.observe(start_rewind)
.observe(end_rewind);
parent
.spawn((
Node { ..default() },
Node {
width: Val::Percent(50.0),
align_items: AlignItems::Center,
justify_content: JustifyContent::Center,
..default()
},
Button,
FlapButton,
children![Text::new("Flap!"),],
children![
Text::new("Flap!"),
TextFont::from_font_size(30.0),
TextLayout::new_with_justify(JustifyText::Center)
],
))
.observe(flap_button);
});
@ -575,9 +595,11 @@ fn init_ui(mut commands: Commands) {
..default()
},
BackgroundColor(WHITE.into()),
children![(
SyncResource::<Score>::default(),
Text::default(),
TextLayout::new_with_justify(JustifyText::Center),
)]
));
}

Loading…
Cancel
Save