This commit is contained in:
parent
1cceebe39d
commit
f9689c5a43
@ -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();
|
||||||
@ -266,62 +271,79 @@ void CPauseMenu::think(int _frames)
|
|||||||
{
|
{
|
||||||
if(m_active)
|
if(m_active)
|
||||||
{
|
{
|
||||||
switch(m_currentState)
|
if(PadGetDown(0)&PAD_START)
|
||||||
{
|
{
|
||||||
// Main menu
|
if(!m_padDebounce)
|
||||||
case STATE__MAIN_MENU:
|
{
|
||||||
m_pauseGuiFrame->think(_frames);
|
if(m_pauseGuiFrame->isSelected())m_pauseGuiFrame->unselect();
|
||||||
switch(m_responseFlag)
|
if(m_confirmQuitGuiFrame->isSelected())m_confirmQuitGuiFrame->unselect();
|
||||||
{
|
unselect();
|
||||||
case RESPONSE__WAITING:
|
}
|
||||||
break;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch(m_currentState)
|
||||||
|
{
|
||||||
|
// Main menu
|
||||||
|
case STATE__MAIN_MENU:
|
||||||
|
m_pauseGuiFrame->think(_frames);
|
||||||
|
switch(m_responseFlag)
|
||||||
|
{
|
||||||
|
case RESPONSE__WAITING:
|
||||||
|
break;
|
||||||
|
|
||||||
case RESPONSE__CONTINUE:
|
case RESPONSE__CONTINUE:
|
||||||
m_pauseGuiFrame->unselect();
|
m_pauseGuiFrame->unselect();
|
||||||
unselect();
|
unselect();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RESPONSE__QUIT:
|
case RESPONSE__QUIT:
|
||||||
m_pauseGuiFrame->unselect();
|
m_pauseGuiFrame->unselect();
|
||||||
m_confirmQuitGuiFrame->select();
|
m_confirmQuitGuiFrame->select();
|
||||||
m_currentState=STATE__CONFIRM_QUIT;
|
m_currentState=STATE__CONFIRM_QUIT;
|
||||||
m_responseFlag=RESPONSE__WAITING;
|
m_responseFlag=RESPONSE__WAITING;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RESPONSE__CONFIRM_QUIT_YES:
|
case RESPONSE__CONFIRM_QUIT_YES:
|
||||||
case RESPONSE__CONFIRM_QUIT_NO:
|
case RESPONSE__CONFIRM_QUIT_NO:
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Confirm quit menu
|
// Confirm quit menu
|
||||||
case STATE__CONFIRM_QUIT:
|
case STATE__CONFIRM_QUIT:
|
||||||
m_confirmQuitGuiFrame->think(_frames);
|
m_confirmQuitGuiFrame->think(_frames);
|
||||||
switch(m_responseFlag)
|
switch(m_responseFlag)
|
||||||
{
|
{
|
||||||
case RESPONSE__WAITING:
|
case RESPONSE__WAITING:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RESPONSE__CONTINUE:
|
case RESPONSE__CONTINUE:
|
||||||
case RESPONSE__QUIT:
|
case RESPONSE__QUIT:
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RESPONSE__CONFIRM_QUIT_YES:
|
case RESPONSE__CONFIRM_QUIT_YES:
|
||||||
m_confirmQuitGuiFrame->unselect();
|
m_confirmQuitGuiFrame->unselect();
|
||||||
CGameScene::setReadyToExit();
|
CGameScene::setReadyToExit();
|
||||||
unselect();
|
unselect();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RESPONSE__CONFIRM_QUIT_NO:
|
case RESPONSE__CONFIRM_QUIT_NO:
|
||||||
m_pauseGuiFrame->select();
|
m_pauseGuiFrame->select();
|
||||||
m_confirmQuitGuiFrame->unselect();
|
m_confirmQuitGuiFrame->unselect();
|
||||||
m_currentState=STATE__MAIN_MENU;
|
m_currentState=STATE__MAIN_MENU;
|
||||||
m_responseFlag=RESPONSE__WAITING;
|
m_responseFlag=RESPONSE__WAITING;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(m_padDebounce)
|
||||||
|
{
|
||||||
|
m_padDebounce=false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user