diff --git a/src/preparation_widget.rs b/src/preparation_widget.rs index 8103408..9f36eec 100644 --- a/src/preparation_widget.rs +++ b/src/preparation_widget.rs @@ -27,6 +27,10 @@ struct ReadySetGoTimer(Timer); #[derive(Component)] struct CountdownText; +/// Marker for the counter bar segment +#[derive(Component)] +struct CountdownBar; + fn spawn_get_ready( mut commands: Commands, mut meshes: ResMut>, @@ -48,6 +52,7 @@ fn spawn_get_ready( children![ (Text::new("Get Ready!"), TextColor(BLACK.into())), ( + CountdownBar, Node { width: Val::Percent(90.0), height: Val::Percent(10.), @@ -74,6 +79,7 @@ fn despawn_get_ready(mut commands: Commands, to_despawn: Query>, + mut bar_segment: Single<&mut Node, With>, time: Res