Since we allow escape to back out of the demonstration, allow BACK to,

too.
This commit is contained in:
Glenn Maynard
2002-08-26 03:51:12 +00:00
parent 40d96cc613
commit cb73056691
+9 -5
View File
@@ -931,7 +931,15 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
if( GAMESTATE->m_bDemonstration )
{
if( MenuI.button==MENU_BUTTON_START && !m_Fade.IsClosing() )
/* Special case:always allow escape. */
if( DeviceI.device==DEVICE_KEYBOARD && DeviceI.button==DIK_ESCAPE && !m_Fade.IsClosing() )
{
this->SendScreenMessage( SM_BeginFadingToTitleMenu, 0 );
}
/* Since escape backs out, we want to allow any other back buttons to
* work, too, to avoid confusion. */
else if( (MenuI.button==MENU_BUTTON_START || MenuI.button==MENU_BUTTON_BACK)
&& !m_Fade.IsClosing() )
{
m_soundMusic.Stop();
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","insert coin") );
@@ -939,10 +947,6 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
this->SendScreenMessage( SM_GoToTitleMenu, 0 );
// m_Fade.CloseWipingRight( SM_GoToTitleMenu );
}
else if( DeviceI.device==DEVICE_KEYBOARD && DeviceI.button==DIK_ESCAPE && !m_Fade.IsClosing() )
{
this->SendScreenMessage( SM_BeginFadingToTitleMenu, 0 );
}
return; // don't fall through below
}