Only play MenuSelect when an item is selected

bevy0.12
Elijah Voigt 2 years ago
parent 39d9b6a6c8
commit 44b233f13f

@ -172,11 +172,11 @@ fn interactive_button(
Interaction::Hovered => { Interaction::Hovered => {
window.single_mut().cursor.icon = CursorIcon::Hand; window.single_mut().cursor.icon = CursorIcon::Hand;
bg_color.0.set_a(0.75); bg_color.0.set_a(0.75);
writer.send(crate::audio::AudioEvent::MenuSelect)
} }
Interaction::Pressed => { Interaction::Pressed => {
window.single_mut().cursor.icon = CursorIcon::Grab; window.single_mut().cursor.icon = CursorIcon::Grab;
bg_color.0.set_a(1.0); bg_color.0.set_a(1.0);
writer.send(crate::audio::AudioEvent::MenuSelect)
} }
}); });
} }

Loading…
Cancel
Save