Sound refactor and improvements (#12764)
This commit is contained in:
@@ -4816,7 +4816,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
|
||||
if ((s.ftype == f_TabHeader) &&
|
||||
(s.fid == event.GUIEvent.Caller->getID())) {
|
||||
if (!s.sound.empty() && m_sound_manager)
|
||||
m_sound_manager->playSound(SimpleSoundSpec(s.sound, 1.0f));
|
||||
m_sound_manager->playSound(0, SoundSpec(s.sound, 1.0f));
|
||||
s.send = true;
|
||||
acceptInput();
|
||||
s.send = false;
|
||||
@@ -4861,7 +4861,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
|
||||
|
||||
if (s.ftype == f_Button || s.ftype == f_CheckBox) {
|
||||
if (!s.sound.empty() && m_sound_manager)
|
||||
m_sound_manager->playSound(SimpleSoundSpec(s.sound, 1.0f));
|
||||
m_sound_manager->playSound(0, SoundSpec(s.sound, 1.0f));
|
||||
|
||||
s.send = true;
|
||||
if (s.is_exit) {
|
||||
@@ -4886,7 +4886,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
|
||||
}
|
||||
}
|
||||
if (!s.sound.empty() && m_sound_manager)
|
||||
m_sound_manager->playSound(SimpleSoundSpec(s.sound, 1.0f));
|
||||
m_sound_manager->playSound(0, SoundSpec(s.sound, 1.0f));
|
||||
s.send = true;
|
||||
acceptInput(quit_mode_no);
|
||||
|
||||
@@ -4904,7 +4904,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
|
||||
s.fdefault.clear();
|
||||
} else if (s.ftype == f_Unknown || s.ftype == f_HyperText) {
|
||||
if (!s.sound.empty() && m_sound_manager)
|
||||
m_sound_manager->playSound(SimpleSoundSpec(s.sound, 1.0f));
|
||||
m_sound_manager->playSound(0, SoundSpec(s.sound, 1.0f));
|
||||
s.send = true;
|
||||
acceptInput();
|
||||
s.send = false;
|
||||
|
||||
Reference in New Issue
Block a user