Allow backing out of the caution screen.
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "ScreenCaution.h"
|
#include "ScreenCaution.h"
|
||||||
|
#include "ScreenTitleMenu.h"
|
||||||
#include "GameConstantsAndTypes.h"
|
#include "GameConstantsAndTypes.h"
|
||||||
#include "ScreenSelectStyle.h"
|
#include "ScreenSelectStyle.h"
|
||||||
#include "ScreenEZ2SelectStyle.h"
|
#include "ScreenEZ2SelectStyle.h"
|
||||||
@@ -24,6 +25,7 @@
|
|||||||
#define USE_NORMAL_OR_EZ2_SELECT_STYLE THEME->GetMetricB("General","UseNormalOrEZ2SelectStyle")
|
#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_DoneOpening = ScreenMessage(SM_User-7);
|
||||||
const ScreenMessage SM_StartClosing = ScreenMessage(SM_User-8);
|
const ScreenMessage SM_StartClosing = ScreenMessage(SM_User-8);
|
||||||
const ScreenMessage SM_GoToSelectMusic = ScreenMessage(SM_User-9);
|
const ScreenMessage SM_GoToSelectMusic = ScreenMessage(SM_User-9);
|
||||||
@@ -40,6 +42,9 @@ ScreenCaution::ScreenCaution()
|
|||||||
m_Wipe.OpenWipingRight( SM_DoneOpening );
|
m_Wipe.OpenWipingRight( SM_DoneOpening );
|
||||||
this->AddSubActor( &m_Wipe );
|
this->AddSubActor( &m_Wipe );
|
||||||
|
|
||||||
|
m_FadeWipe.SetOpened();
|
||||||
|
this->AddSubActor( &m_FadeWipe );
|
||||||
|
|
||||||
this->SendScreenMessage( SM_StartClosing, 3 );
|
this->SendScreenMessage( SM_StartClosing, 3 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,6 +69,9 @@ void ScreenCaution::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
case SM_DoneOpening:
|
case SM_DoneOpening:
|
||||||
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo(ANNOUNCER_CAUTION) );
|
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo(ANNOUNCER_CAUTION) );
|
||||||
break;
|
break;
|
||||||
|
case SM_GoToPrevState:
|
||||||
|
SCREENMAN->SetNewScreen( new ScreenTitleMenu );
|
||||||
|
break;
|
||||||
case SM_GoToSelectMusic:
|
case SM_GoToSelectMusic:
|
||||||
if( USE_NORMAL_OR_EZ2_SELECT_STYLE )
|
if( USE_NORMAL_OR_EZ2_SELECT_STYLE )
|
||||||
SCREENMAN->SetNewScreen( new ScreenEz2SelectStyle );
|
SCREENMAN->SetNewScreen( new ScreenEz2SelectStyle );
|
||||||
@@ -86,3 +94,11 @@ void ScreenCaution::MenuStart( const PlayerNumber p )
|
|||||||
if( !m_Wipe.IsOpening() && !m_Wipe.IsClosing() )
|
if( !m_Wipe.IsOpening() && !m_Wipe.IsClosing() )
|
||||||
m_Wipe.CloseWipingRight( SM_GoToSelectMusic );
|
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") );
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#include "Screen.h"
|
#include "Screen.h"
|
||||||
#include "TransitionFade.h"
|
#include "TransitionFade.h"
|
||||||
|
#include "TransitionFadeWipe.h"
|
||||||
#include "RandomSample.h"
|
#include "RandomSample.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -28,8 +29,10 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void MenuStart( const PlayerNumber p );
|
void MenuStart( const PlayerNumber p );
|
||||||
|
void MenuBack( const PlayerNumber p );
|
||||||
Sprite m_sprCaution;
|
Sprite m_sprCaution;
|
||||||
TransitionFade m_Wipe;
|
TransitionFade m_Wipe;
|
||||||
|
TransitionFadeWipe m_FadeWipe;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user