Load the commands and set xy. The metrics can handle keeping the second page off screen.

This commit is contained in:
Steve Checkoway
2007-06-09 21:08:27 +00:00
parent 2477d97e88
commit 9ef3b2b838
+5 -13
View File
@@ -171,12 +171,12 @@ void ScreenSelectMaster::Init()
{ {
m_sprMore[page].Load( THEME->GetPathG(m_sName, ssprintf("more page%d",page+1)) ); m_sprMore[page].Load( THEME->GetPathG(m_sName, ssprintf("more page%d",page+1)) );
m_sprMore[page]->SetName( ssprintf("MorePage%d",page+1) ); m_sprMore[page]->SetName( ssprintf("MorePage%d",page+1) );
ActorUtil::LoadAllCommands( *m_sprMore[page], m_sName ); LOAD_ALL_COMMANDS_AND_SET_XY( m_sprMore[page] );
this->AddChild( m_sprMore[page] ); this->AddChild( m_sprMore[page] );
m_sprExplanation[page].Load( THEME->GetPathG(m_sName, ssprintf("explanation page%d",page+1)) ); m_sprExplanation[page].Load( THEME->GetPathG(m_sName, ssprintf("explanation page%d",page+1)) );
m_sprExplanation[page]->SetName( ssprintf("ExplanationPage%d",page+1) ); m_sprExplanation[page]->SetName( ssprintf("ExplanationPage%d",page+1) );
ActorUtil::LoadAllCommands( *m_sprExplanation[page], m_sName ); LOAD_ALL_COMMANDS_AND_SET_XY( m_sprExplanation[page] );
this->AddChild( m_sprExplanation[page] ); this->AddChild( m_sprExplanation[page] );
} }
@@ -832,20 +832,12 @@ void ScreenSelectMaster::TweenOnScreen()
} }
} }
//We have to move page two's explanation and more off the screen FOREACH_ENUM( Page, page )
//so it doesn't just sit there on page one. (Thanks Zhek)
for (int page=0;page<NUM_Page;page++)
{ {
m_sprMore[page]->SetXY(999,999); m_sprExplanation[page]->PlayCommand( "On" );
m_sprExplanation[page]->SetXY(999,999); m_sprMore[page]->PlayCommand( "On" );
} }
SET_XY( m_sprExplanation[GetCurrentPage()] );
SET_XY( m_sprMore[GetCurrentPage()] );
m_sprExplanation[GetCurrentPage()]->PlayCommand( "On" );
m_sprMore[GetCurrentPage()]->PlayCommand( "On" );
ScreenSelect::TweenOnScreen(); ScreenSelect::TweenOnScreen();
} }