diff --git a/src/widgets.rs b/src/widgets.rs index baee080..d7fa640 100644 --- a/src/widgets.rs +++ b/src/widgets.rs @@ -141,6 +141,7 @@ fn spawn_gameover_ui(mut commands: Commands) { children![ ( Button, + GameOverMenuAction::ToMainMenu, Node { width: Val::Px(150.0), height: Val::Px(65.0), @@ -161,6 +162,7 @@ fn spawn_gameover_ui(mut commands: Commands) { ), ( Button, + GameOverMenuAction::Quit, Node { width: Val::Px(150.0), height: Val::Px(65.0), @@ -216,17 +218,31 @@ fn animate_get_ready_widget( /// place to keep all system logic for this plugin. fn operate_gameover_ui( mut interactions: Query< - (&Interaction, &mut BackgroundColor, &mut BorderColor), + ( + &Interaction, + &mut BackgroundColor, + &mut BorderColor, + &GameOverMenuAction, + ), (Changed, With