This commit is contained in:
Paul 2001-01-31 16:11:42 +00:00
parent 152cba0fbc
commit bf44855659
3 changed files with 43 additions and 3 deletions

View File

@ -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();
}

View File

@ -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(*target<m_min)*target=m_min;
else if(*target>m_max)*target=m_max;
if(*target<m_min)
{
*target=m_min;
noise=CSoundMediator::SFX_FRONT_END__ERROR;
}
else if(*target>m_max)
{
*target=m_max;
noise=CSoundMediator::SFX_FRONT_END__ERROR;
}
if(makeNoise)
{
CSoundMediator::playSfx(noise);
}
}
}

View File

@ -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);
}
}