This commit is contained in:
Paul 2001-07-10 19:43:13 +00:00
parent 1cceebe39d
commit f9689c5a43
2 changed files with 71 additions and 48 deletions

View file

@ -55,6 +55,10 @@
#include "game\gameslot.h" #include "game\gameslot.h"
#endif #endif
#ifndef __PAD_PADS_H__
#include "pad/pads.h"
#endif
/* Std Lib /* Std Lib
------- */ ------- */
@ -237,6 +241,7 @@ void CPauseMenu::select()
{ {
int chapter,level; int chapter,level;
m_active=true; m_active=true;
m_padDebounce=true;
m_currentState=STATE__MAIN_MENU; m_currentState=STATE__MAIN_MENU;
m_responseFlag=RESPONSE__WAITING; m_responseFlag=RESPONSE__WAITING;
m_pauseGuiFrame->select(); m_pauseGuiFrame->select();
@ -265,6 +270,17 @@ void CPauseMenu::unselect()
void CPauseMenu::think(int _frames) void CPauseMenu::think(int _frames)
{ {
if(m_active) if(m_active)
{
if(PadGetDown(0)&PAD_START)
{
if(!m_padDebounce)
{
if(m_pauseGuiFrame->isSelected())m_pauseGuiFrame->unselect();
if(m_confirmQuitGuiFrame->isSelected())m_confirmQuitGuiFrame->unselect();
unselect();
}
}
else
{ {
switch(m_currentState) switch(m_currentState)
{ {
@ -324,6 +340,12 @@ void CPauseMenu::think(int _frames)
break; break;
} }
} }
if(m_padDebounce)
{
m_padDebounce=false;
}
}
} }

View file

@ -64,6 +64,7 @@ private:
int m_active; int m_active;
int m_padDebounce;
int m_responseFlag; int m_responseFlag;
STATE m_currentState; STATE m_currentState;