mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Update previous references to 'volume' to prevent ambiguity. Update label for audio device selection in settings dialog. I don't think it is displayed, but maybe useful for documentation.
This commit is contained in:
parent
8cf6546dec
commit
ef3ad3519b
@ -178,22 +178,22 @@ impl AudioFrontend {
|
||||
self.music_volume
|
||||
}
|
||||
|
||||
pub fn set_sfx_volume(&mut self, volume: f32) {
|
||||
self.sfx_volume = volume;
|
||||
pub fn set_sfx_volume(&mut self, sfx_volume: f32) {
|
||||
self.sfx_volume = sfx_volume;
|
||||
|
||||
for channel in self.channels.iter_mut() {
|
||||
if channel.get_audio_type() == AudioType::Sfx {
|
||||
channel.set_volume(volume);
|
||||
channel.set_volume(sfx_volume);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_music_volume(&mut self, volume: f32) {
|
||||
self.music_volume = volume;
|
||||
pub fn set_music_volume(&mut self, music_volume: f32) {
|
||||
self.music_volume = music_volume;
|
||||
|
||||
for channel in self.channels.iter_mut() {
|
||||
if channel.get_audio_type() == AudioType::Music {
|
||||
channel.set_volume(volume);
|
||||
channel.set_volume(music_volume);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -152,8 +152,8 @@ pub enum Event {
|
||||
AdjustMousePan(u32),
|
||||
AdjustMouseZoom(u32),
|
||||
AdjustViewDistance(u32),
|
||||
AdjustSfxVolume(f32),
|
||||
AdjustMusicVolume(f32),
|
||||
AdjustSfxVolume(f32),
|
||||
ChangeAudioDevice(String),
|
||||
ChangeMaxFPS(u32),
|
||||
ChangeFOV(u16),
|
||||
@ -789,11 +789,11 @@ impl Hud {
|
||||
settings_window::Event::CrosshairTransp(crosshair_transp) => {
|
||||
events.push(Event::CrosshairTransp(crosshair_transp));
|
||||
}
|
||||
settings_window::Event::AdjustMusicVolume(volume) => {
|
||||
events.push(Event::AdjustMusicVolume(volume));
|
||||
settings_window::Event::AdjustMusicVolume(music_volume) => {
|
||||
events.push(Event::AdjustMusicVolume(music_volume));
|
||||
}
|
||||
settings_window::Event::AdjustSfxVolume(volume) => {
|
||||
events.push(Event::AdjustSfxVolume(volume));
|
||||
settings_window::Event::AdjustSfxVolume(sfx_volume) => {
|
||||
events.push(Event::AdjustSfxVolume(sfx_volume));
|
||||
}
|
||||
settings_window::Event::MaximumFPS(max_fps) => {
|
||||
events.push(Event::ChangeMaxFPS(max_fps));
|
||||
|
@ -1281,7 +1281,7 @@ impl<'a> Widget for SettingsWindow<'a> {
|
||||
// Audio Device Selector --------------------------------------------
|
||||
let device = &self.global_state.audio.device;
|
||||
let device_list = &self.global_state.audio.device_list;
|
||||
Text::new("Audio Volume")
|
||||
Text::new("Audio Device")
|
||||
.down_from(state.ids.sfx_volume_slider, 10.0)
|
||||
.font_size(14)
|
||||
.font_id(self.fonts.opensans)
|
||||
|
Loading…
Reference in New Issue
Block a user