diff --git a/crates/horizon-client/src/game/screens.rs b/crates/horizon-client/src/game/screens.rs index ac4d16274..586e21879 100644 --- a/crates/horizon-client/src/game/screens.rs +++ b/crates/horizon-client/src/game/screens.rs @@ -149,9 +149,6 @@ impl Game<'_> { .find(|b| b.5 && ui::hovered(self.cursor, b.0, b.1, b.2, 20.0)) .map(|b| b.4) }; - if hit.is_some() && !horizon_client::ui_theme::horizon() { - self.audio.play_button_click(); - } match hit { Some(0) => { self.screen = Screen::Playing; @@ -171,6 +168,9 @@ impl Game<'_> { Some(2) => self.close_world()?, _ => {} } + if hit.is_some() && !horizon_client::ui_theme::horizon() { + self.audio.play_button_click(); + } Ok(()) } /// DeathScreen: gradient, the title at double size, the cause and score. @@ -263,9 +263,6 @@ impl Game<'_> { .into_iter() .find(|d| ui::hovered(self.cursor, d.0, d.1, 200.0, 20.0)) .map(|d| d.3); - if hit.is_some() { - self.audio.play_button_click(); - } match hit { Some(0) if self.remote.is_some() => { self.ui.death_text = None; @@ -295,6 +292,9 @@ impl Game<'_> { Some(1) => self.close_world()?, _ => {} } + if hit.is_some() { + self.audio.play_button_click(); + } Ok(()) } }