diff --git a/source/frontend/maintitl.cpp b/source/frontend/maintitl.cpp index fb1d409ca..baacb9b20 100644 --- a/source/frontend/maintitl.cpp +++ b/source/frontend/maintitl.cpp @@ -311,6 +311,7 @@ void CFrontEndMainTitles::think(int _frames) case MODE__PRESS_START: if(!CFader::isFading()&&PadGetDown(0)&PAD_START) { + CSoundMediator::playSfx(CSoundMediator::SFX_FRONT_END__OK); m_mode=MODE__SELECT_OPTION; m_mainMenu->select(); } diff --git a/source/gui/gbutton.cpp b/source/gui/gbutton.cpp index f1febed81..e056fb8dd 100644 --- a/source/gui/gbutton.cpp +++ b/source/gui/gbutton.cpp @@ -22,6 +22,10 @@ #include "pad\pads.h" #endif +#ifndef __SOUND_SOUND_H__ +#include "sound\sound.h" +#endif + /* Std Lib ------- */ @@ -98,6 +102,7 @@ void CGUIToggleButton::think(int _frames) { *target=true; } + CSoundMediator::playSfx(CSoundMediator::SFX_FRONT_END__SELECT); } } } @@ -145,9 +150,10 @@ void CGUIValueButton::think(int _frames) CGUIObject::think(_frames); if(isSelected()) { - if(PadGetRepeat(0)&PAD_CROSS) + if(PadGetDown(0)&PAD_CROSS) { *getTarget()=m_value; + CSoundMediator::playSfx(CSoundMediator::SFX_FRONT_END__SELECT); } } } @@ -222,6 +228,7 @@ void CGUICycleButton::think(int _frames) data=getData(); } *target=*data; + CSoundMediator::playSfx(CSoundMediator::SFX_FRONT_END__SELECT); } } } @@ -286,28 +293,48 @@ void CGUISliderButton::think(int _frames) { int padRepeat,padDown; int *target=getTarget(); + int makeNoise=false; + CSoundMediator::SFXID noise=CSoundMediator::SFX_FRONT_END__SELECT; padRepeat=PadGetRepeat(0); padDown=PadGetDown(0); if(padDown&PAD_LEFT) { *target-=1; + makeNoise=true; + noise=CSoundMediator::SFX_FRONT_END__SELECT; } else if(padDown&PAD_RIGHT) { *target+=1; + makeNoise=true; } else if(padRepeat&PAD_LEFT) { *target-=(_frames*m_scrollSpeed); + makeNoise=true; } else if(padRepeat&PAD_RIGHT) { *target+=(_frames*m_scrollSpeed); + makeNoise=true; } - if(*targetm_max)*target=m_max; + if(*targetm_max) + { + *target=m_max; + noise=CSoundMediator::SFX_FRONT_END__ERROR; + } + + if(makeNoise) + { + CSoundMediator::playSfx(noise); + } } } diff --git a/source/gui/gframe.cpp b/source/gui/gframe.cpp index 64a64b074..4b3123e8e 100644 --- a/source/gui/gframe.cpp +++ b/source/gui/gframe.cpp @@ -22,6 +22,10 @@ #include "pad\pads.h" #endif +#ifndef __SOUND_SOUND_H__ +#include "sound\sound.h" +#endif + /* Std Lib ------- */ @@ -150,6 +154,7 @@ int CGUIGroupFrame::isUnselectable() void CGUIControlFrame::think(int _frames) { int pad; + int makeNoise=false; CGUIObject::think(_frames); @@ -181,6 +186,7 @@ void CGUIControlFrame::think(int _frames) pGUI->select(); } } + makeNoise=true; } else if(pad&PAD_UP) { @@ -220,6 +226,12 @@ void CGUIControlFrame::think(int _frames) prevGUI->select(); } } + makeNoise=true; + } + + if(makeNoise) + { + CSoundMediator::playSfx(CSoundMediator::SFX_FRONT_END__MOVE_CURSOR); } }