diff --git a/src/menu.rs b/src/menu.rs index a64c25a..4f13e66 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -31,7 +31,8 @@ impl Plugin for MenuPlugin { setup_sets, setup_alert, ), - ); + ) + .add_systems(OnEnter(ViewState::Play), enable_continue); } } @@ -84,9 +85,13 @@ fn setup(mut commands: Commands, server: Res) { )); parent - .spawn(button_builder(Node::default())) + .spawn(( + button_builder(Node::default()), + Visibility::Hidden, + ContinueButton, + )) .with_children(|parent| { - parent.spawn(Text("Play".to_string())); + parent.spawn(Text("Continue".to_string())); }) .observe(button_hover_on) .observe(button_hover_off) @@ -330,7 +335,7 @@ fn setup_about(mut commands: Commands) { }, )); parent.spawn(( - Text("This videogame version was developed by Elijah Voigt.".into()), + Text("This videogame version was developed by Elijah Voigt with music by Sam Hall.".into()), Node { margin: UiRect::all(Val::Px(5.0)), padding: UiRect::all(Val::Px(5.0)), @@ -569,3 +574,10 @@ fn setup_alert(mut commands: Commands) { fn ui_alert(trigger: Trigger, mut query: Query<&mut Text, With>) { query.single_mut().0 = trigger.event().0.clone(); } + +#[derive(Component)] +struct ContinueButton; + +fn enable_continue(mut it: Single<&mut Visibility, With>) { + **it = Visibility::Inherited; +} diff --git a/todo.txt b/todo.txt index df269c1..1622ab8 100644 --- a/todo.txt +++ b/todo.txt @@ -1,11 +1,7 @@ TODO: -* for testing, hotkeys h and enter for help and submit respectively -* there is a "new game" bug where I think SetNumber is not cleaned up properly -* new game should work -* A deck with face-down card(s) * Make "set" button visually interesting when 3 cards selected -* Better shuffling +* Make menus consistent Later: -* View all cards with some indication of in-set * Make button(s) look pretty +* for testing, hotkeys h and enter for help and submit respectively