cleanup
This commit is contained in:
parent
1bd1525eb8
commit
548386ef54
|
@ -184,7 +184,10 @@ pub fn handle_game_event(
|
||||||
prefs.save();
|
prefs.save();
|
||||||
}
|
}
|
||||||
GameEvent::SetSound(cycle) => {
|
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) => {
|
Some(mode) => {
|
||||||
settings.set_noise_cancellation_mode(mode);
|
settings.set_noise_cancellation_mode(mode);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,8 +34,8 @@ pub mod prelude {
|
||||||
pub use crate::{
|
pub use crate::{
|
||||||
actor, audio, camera, chat, cmd, common, game, hud, load, menu, nature, var, visual, world,
|
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::Cycle::Next;
|
||||||
|
pub use game::Turn::Toggle;
|
||||||
pub use game::{GameEvent, Turn};
|
pub use game::{GameEvent, Turn};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -458,9 +458,9 @@ pub fn update_menu(
|
||||||
|
|
||||||
match MENUDEF[i].1 {
|
match MENUDEF[i].1 {
|
||||||
MenuAction::ToggleSound => {
|
MenuAction::ToggleSound => {
|
||||||
let noisecancel =
|
let noisecancel = if let Some(noisecancel) = settings
|
||||||
if let Some(noisecancel) =
|
.noise_cancellation_modes
|
||||||
settings.noise_cancellation_modes.get(settings.noise_cancellation_mode)
|
.get(settings.noise_cancellation_mode)
|
||||||
{
|
{
|
||||||
noisecancel
|
noisecancel
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue