From 7123192271aa71f7c91cfdc5aa0f357acfabc212 Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Sun, 27 Jul 2025 10:33:53 -0500 Subject: [PATCH] Implement the main menu despawn function --- src/title_screen.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/title_screen.rs b/src/title_screen.rs index 8299d1c..2669f7f 100644 --- a/src/title_screen.rs +++ b/src/title_screen.rs @@ -38,6 +38,11 @@ fn spawn_menu(mut commands: Commands) { }); } -fn despawn_menu() { - todo!(); +fn despawn_menu( + mut commands: Commands, + to_despawn: Query>, +) { + for entity in &to_despawn { + commands.entity(entity).despawn(); + } }