Fix ScreenJukebox, ScreenMusicScroll
This commit is contained in:
@@ -147,7 +147,7 @@ ScreenMusicScroll::ScreenMusicScroll()
|
||||
|
||||
GAMESTATE->Reset(); // so that credits message for both players will show
|
||||
|
||||
m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations","music scroll") );
|
||||
m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations","ScreenMusicScroll background") );
|
||||
this->AddChild( &m_Background );
|
||||
|
||||
|
||||
@@ -187,13 +187,16 @@ ScreenMusicScroll::ScreenMusicScroll()
|
||||
|
||||
this->SendScreenMessage( SM_BeginFadingOut, 0.2f * i + 3.0f );
|
||||
|
||||
this->AddChild( &m_Fade );
|
||||
m_In.Load( THEME->GetPathTo("BGAnimations","ScreenMusicScroll in") );
|
||||
// this->AddChild( &m_In ); // draw and update manually
|
||||
m_In.StartTransitioning();
|
||||
|
||||
m_Out.Load( THEME->GetPathTo("BGAnimations","ScreenMusicScroll out") );
|
||||
// this->AddChild( &m_Out ); // draw and update manually
|
||||
|
||||
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("music scroll") );
|
||||
|
||||
SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenMusicScroll music") );
|
||||
|
||||
m_Fade.OpenWipingRight();
|
||||
}
|
||||
|
||||
|
||||
@@ -203,6 +206,9 @@ void ScreenMusicScroll::Update( float fDeltaTime )
|
||||
|
||||
for( unsigned i=0; i<m_iNumLines; i++ )
|
||||
m_textLines[i].Update( fDeltaTime );
|
||||
|
||||
m_In.Update( fDeltaTime );
|
||||
m_Out.Update( fDeltaTime );
|
||||
}
|
||||
|
||||
|
||||
@@ -217,15 +223,16 @@ void ScreenMusicScroll::DrawPrimitives()
|
||||
m_textLines[i].Draw();
|
||||
}
|
||||
|
||||
m_Fade.Draw(); // render it again so it shows over the text
|
||||
m_In.Draw(); // render it again so it shows over the text
|
||||
m_Out.Draw(); // render it again so it shows over the text
|
||||
}
|
||||
|
||||
|
||||
void ScreenMusicScroll::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
||||
{
|
||||
LOG->Trace( "ScreenMusicScroll::Input()" );
|
||||
// LOG->Trace( "ScreenMusicScroll::Input()" );
|
||||
|
||||
if( m_Fade.IsClosing() )
|
||||
if( m_In.IsTransitioning() || m_Out.IsTransitioning() )
|
||||
return;
|
||||
|
||||
Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler
|
||||
@@ -236,7 +243,8 @@ void ScreenMusicScroll::HandleScreenMessage( const ScreenMessage SM )
|
||||
switch( SM )
|
||||
{
|
||||
case SM_BeginFadingOut:
|
||||
m_Fade.CloseWipingRight( SM_GoToNextScreen );
|
||||
if( !m_Out.IsTransitioning() )
|
||||
m_Out.StartTransitioning( SM_GoToNextScreen );
|
||||
break;
|
||||
case SM_GoToNextScreen:
|
||||
SONGMAN->SaveMachineScoresToDisk();
|
||||
@@ -247,11 +255,11 @@ void ScreenMusicScroll::HandleScreenMessage( const ScreenMessage SM )
|
||||
|
||||
void ScreenMusicScroll::MenuStart( PlayerNumber pn )
|
||||
{
|
||||
m_Fade.CloseWipingRight( SM_GoToNextScreen );
|
||||
this->SendScreenMessage( SM_BeginFadingOut, 0 );
|
||||
}
|
||||
|
||||
void ScreenMusicScroll::MenuBack( PlayerNumber pn )
|
||||
{
|
||||
MenuStart( pn );
|
||||
this->SendScreenMessage( SM_BeginFadingOut, 0 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user