Since we allow escape to back out of the demonstration, allow BACK to,
too.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user