From fc43be0777501e69d558c05b16bfe752adaec789 Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Wed, 13 Aug 2025 14:22:00 -0500 Subject: [PATCH] Hook up the action selectors to the buttons --- src/widgets.rs | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) 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