This commit is contained in:
yuni 2024-06-17 01:16:53 +02:00
parent 1bd1525eb8
commit 548386ef54
3 changed files with 13 additions and 10 deletions

View file

@ -184,7 +184,10 @@ pub fn handle_game_event(
prefs.save();
}
GameEvent::SetSound(cycle) => {
match cycle.to_index(settings.noise_cancellation_mode, &settings.noise_cancellation_modes) {
match cycle.to_index(
settings.noise_cancellation_mode,
&settings.noise_cancellation_modes,
) {
Some(mode) => {
settings.set_noise_cancellation_mode(mode);
}

View file

@ -34,8 +34,8 @@ pub mod prelude {
pub use crate::{
actor, audio, camera, chat, cmd, common, game, hud, load, menu, nature, var, visual, world,
};
pub use game::Turn::Toggle;
pub use game::Cycle::Next;
pub use game::Turn::Toggle;
pub use game::{GameEvent, Turn};
}

View file

@ -458,9 +458,9 @@ pub fn update_menu(
match MENUDEF[i].1 {
MenuAction::ToggleSound => {
let noisecancel =
if let Some(noisecancel) =
settings.noise_cancellation_modes.get(settings.noise_cancellation_mode)
let noisecancel = if let Some(noisecancel) = settings
.noise_cancellation_modes
.get(settings.noise_cancellation_mode)
{
noisecancel
} else {