Mis le son qui joue après que le volume soit changé pour les contrôles de volume
This commit is contained in:
parent
935a977bdf
commit
e4316e7d8d
@ -2317,22 +2317,22 @@ void Engine::MousePressEvent(const MOUSE_BUTTON& button, int x, int y) {
|
|||||||
float normalizedPosition = (x - leftBar) / barLength;
|
float normalizedPosition = (x - leftBar) / barLength;
|
||||||
|
|
||||||
if (m_selectedOption == 0 && x > leftBar && x < rightBar && y > bottomBarPrincipal && y < topBarPrincipal) {
|
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_selectedOptAudioMainBar = true;
|
||||||
m_mainvolume = normalizedPosition;
|
m_mainvolume = normalizedPosition;
|
||||||
m_audio.SetMainVolume(m_mainvolume);
|
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) {
|
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_selectedOptAudioMusicBar = true;
|
||||||
m_musicvolume = normalizedPosition;
|
m_musicvolume = normalizedPosition;
|
||||||
m_audio.SetMusicVolume(m_musicvolume);
|
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) {
|
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_selectedOptAudioSfxBar = true;
|
||||||
m_sfxvolume = normalizedPosition;
|
m_sfxvolume = normalizedPosition;
|
||||||
m_audio.SetSfxVolume(m_sfxvolume);
|
m_audio.SetSfxVolume(m_sfxvolume);
|
||||||
|
m_audio.playSound(AUDIO_PATH "snap.wav", m_sfxvolume);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resolution
|
// Resolution
|
||||||
|
Loading…
Reference in New Issue
Block a user