mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Sound refactor and improvements (#12764)
This commit is contained in:
parent
8e1af25738
commit
edcbfa31c9
52 changed files with 2802 additions and 1211 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue