Allow backing out of the caution screen.

This commit is contained in:
Glenn Maynard
2002-08-20 07:58:19 +00:00
parent 8814a37d19
commit 50370506d9
2 changed files with 19 additions and 0 deletions
+16
View File
@@ -12,6 +12,7 @@
#include "ScreenCaution.h"
#include "ScreenTitleMenu.h"
#include "GameConstantsAndTypes.h"
#include "ScreenSelectStyle.h"
#include "ScreenEZ2SelectStyle.h"
@@ -24,6 +25,7 @@
#define USE_NORMAL_OR_EZ2_SELECT_STYLE THEME->GetMetricB("General","UseNormalOrEZ2SelectStyle")
const ScreenMessage SM_GoToPrevState = ScreenMessage(SM_User-6);
const ScreenMessage SM_DoneOpening = ScreenMessage(SM_User-7);
const ScreenMessage SM_StartClosing = ScreenMessage(SM_User-8);
const ScreenMessage SM_GoToSelectMusic = ScreenMessage(SM_User-9);
@@ -40,6 +42,9 @@ ScreenCaution::ScreenCaution()
m_Wipe.OpenWipingRight( SM_DoneOpening );
this->AddSubActor( &m_Wipe );
m_FadeWipe.SetOpened();
this->AddSubActor( &m_FadeWipe );
this->SendScreenMessage( SM_StartClosing, 3 );
}
@@ -64,6 +69,9 @@ void ScreenCaution::HandleScreenMessage( const ScreenMessage SM )
case SM_DoneOpening:
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo(ANNOUNCER_CAUTION) );
break;
case SM_GoToPrevState:
SCREENMAN->SetNewScreen( new ScreenTitleMenu );
break;
case SM_GoToSelectMusic:
if( USE_NORMAL_OR_EZ2_SELECT_STYLE )
SCREENMAN->SetNewScreen( new ScreenEz2SelectStyle );
@@ -86,3 +94,11 @@ void ScreenCaution::MenuStart( const PlayerNumber p )
if( !m_Wipe.IsOpening() && !m_Wipe.IsClosing() )
m_Wipe.CloseWipingRight( SM_GoToSelectMusic );
}
void ScreenCaution::MenuBack( const PlayerNumber p )
{
this->ClearMessageQueue();
m_FadeWipe.CloseWipingLeft( SM_GoToPrevState );
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu back") );
}