simplify ActorScroller::Load2
This commit is contained in:
@@ -38,12 +38,11 @@ ActorScroller::ActorScroller()
|
||||
}
|
||||
|
||||
void ActorScroller::Load2(
|
||||
float fSecondsPerItem,
|
||||
float fNumItemsToDraw,
|
||||
float fItemHeight,
|
||||
bool bLoop )
|
||||
{
|
||||
Load3( fSecondsPerItem, fNumItemsToDraw,
|
||||
Load3( 0, fNumItemsToDraw,
|
||||
ssprintf("function(self,offset,itemIndex,numItems) self:y(%f*offset) end",fItemHeight), 1, bLoop );
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ public:
|
||||
ActorScroller();
|
||||
|
||||
void Load2(
|
||||
float fSecondsPerItem,
|
||||
float fNumItemsToDraw,
|
||||
float fItemHeight,
|
||||
bool bLoop );
|
||||
|
||||
@@ -78,10 +78,10 @@ void CourseContentsList::SetFromGameState()
|
||||
bool bLoop = pMasterTrail->m_vEntries.size() > uNumEntriesToShow;
|
||||
|
||||
this->Load2(
|
||||
0.7f,
|
||||
(float)MAX_VISIBLE_ITEMS,
|
||||
m_vpDisplay[0]->GetUnzoomedHeight(),
|
||||
bLoop );
|
||||
this->SetSecondsPerItem( 0.7f );
|
||||
this->EnableMask( m_vpDisplay[0]->GetUnzoomedWidth(), m_vpDisplay[0]->GetUnzoomedHeight() );
|
||||
this->SetSecondsPauseBetweenItems( 0.7f );
|
||||
this->ScrollThroughAllItems();
|
||||
|
||||
@@ -365,7 +365,8 @@ void ScoreScroller::Load(
|
||||
for( int i=0; i<iNumCopies; ++i )
|
||||
this->AddChild( new ScoreRowItem(ItemTemplate) );
|
||||
|
||||
DynamicActorScroller::Load2( SONG_SCORE_SECONDS_PER_ROW, (float) m_metricSongScoreRowsToDraw, fItemHeight, false );
|
||||
DynamicActorScroller::Load2( (float) m_metricSongScoreRowsToDraw, fItemHeight, false );
|
||||
DynamicActorScroller::SetSecondsPerItem( SONG_SCORE_SECONDS_PER_ROW );
|
||||
DynamicActorScroller::EnableMask( SCREEN_WIDTH, fItemHeight );
|
||||
DynamicActorScroller::ScrollThroughAllItems();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user