Merge pull request #575 from Online5277/fix/quit-button-sound
Preserve quit button sounds when leaving a world
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user