mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Added a keybind for muting the music [F8]
This commit is contained in:
parent
6605c2657f
commit
e4b213cac5
@ -152,6 +152,8 @@ pub enum GameInput {
|
||||
SpectateSpeedBoost,
|
||||
#[strum(serialize = "gameinput-spectateviewpoint")]
|
||||
SpectateViewpoint,
|
||||
#[strum(serialize = "gameinput-mute-music")]
|
||||
MuteMusic,
|
||||
}
|
||||
|
||||
impl GameInput {
|
||||
|
@ -67,7 +67,9 @@ use crate::{
|
||||
},
|
||||
session::{
|
||||
interactable::Interactable,
|
||||
settings_change::{Chat as ChatChange, Interface as InterfaceChange, SettingsChange},
|
||||
settings_change::{
|
||||
Audio, Chat as ChatChange, Interface as InterfaceChange, SettingsChange,
|
||||
},
|
||||
},
|
||||
settings::chat::ChatFilter,
|
||||
ui::{
|
||||
@ -4187,6 +4189,15 @@ impl Hud {
|
||||
GameInput::MapZoomOut if state => {
|
||||
handle_map_zoom(0.5, self.world_map.1, &self.show, global_state)
|
||||
},
|
||||
GameInput::MuteMusic if state => {
|
||||
self.events
|
||||
.push(Event::SettingsChange(SettingsChange::Audio(
|
||||
Audio::MuteMusicVolume(
|
||||
!global_state.settings.audio.music_volume.muted,
|
||||
),
|
||||
)));
|
||||
true
|
||||
},
|
||||
// Skillbar
|
||||
input => {
|
||||
if let Some(slot) = try_hotbar_slot_from_input(input) {
|
||||
|
@ -191,6 +191,7 @@ impl ControlSettings {
|
||||
GameInput::MapSetMarker => KeyMouse::Mouse(MouseButton::Middle),
|
||||
GameInput::SpectateSpeedBoost => KeyMouse::Key(VirtualKeyCode::LControl),
|
||||
GameInput::SpectateViewpoint => KeyMouse::Mouse(MouseButton::Middle),
|
||||
GameInput::MuteMusic => KeyMouse::Key(VirtualKeyCode::F8),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user