diff --git a/SQCSim2021/engine.cpp b/SQCSim2021/engine.cpp index 3b1e55e..b00e88e 100644 --- a/SQCSim2021/engine.cpp +++ b/SQCSim2021/engine.cpp @@ -2317,22 +2317,22 @@ void Engine::MousePressEvent(const MOUSE_BUTTON& button, int x, int y) { float normalizedPosition = (x - leftBar) / barLength; if (m_selectedOption == 0 && x > leftBar && x < rightBar && y > bottomBarPrincipal && y < topBarPrincipal) { - m_audio.playSound(AUDIO_PATH "snap.wav", m_sfxvolume); m_selectedOptAudioMainBar = true; m_mainvolume = normalizedPosition; m_audio.SetMainVolume(m_mainvolume); + m_audio.playSound(AUDIO_PATH "snap.wav", m_sfxvolume); } else if (m_selectedOption == 0 && x > leftBar && x < rightBar && y > bottomBarMusique && y < topBarMusique) { - m_audio.playSound(AUDIO_PATH "snap.wav", m_sfxvolume); m_selectedOptAudioMusicBar = true; m_musicvolume = normalizedPosition; m_audio.SetMusicVolume(m_musicvolume); + m_audio.playSound(AUDIO_PATH "snap.wav", m_sfxvolume); } else if (m_selectedOption == 0 && x > leftBar && x < rightBar && y > bottomBarEffets && y < topBarEffets) { - m_audio.playSound(AUDIO_PATH "snap.wav", m_sfxvolume); m_selectedOptAudioSfxBar = true; m_sfxvolume = normalizedPosition; m_audio.SetSfxVolume(m_sfxvolume); + m_audio.playSound(AUDIO_PATH "snap.wav", m_sfxvolume); } // Resolution