allow a scroll time of 0 for non-scrolling lists
This commit is contained in:
@@ -27,7 +27,6 @@ void ActorScroller::Load(
|
||||
const RageVector3 &vTranslateTerm2
|
||||
)
|
||||
{
|
||||
ASSERT( fSecondsPerItem > 0 );
|
||||
m_fSecondsPerItem = fSecondsPerItem;
|
||||
m_iNumItemsToDraw = iNumItemsToDraw;
|
||||
m_vRotationDegrees = vRotationDegrees;
|
||||
@@ -45,7 +44,8 @@ void ActorScroller::Update( float fDeltaTime )
|
||||
if( m_fHibernateSecondsLeft > 0 )
|
||||
return; // early abort
|
||||
|
||||
fapproach( m_fCurrentItem, m_fDestinationItem, fDeltaTime/m_fSecondsPerItem );
|
||||
if( m_fSecondsPerItem > 0 )
|
||||
fapproach( m_fCurrentItem, m_fDestinationItem, fDeltaTime/m_fSecondsPerItem );
|
||||
}
|
||||
|
||||
void ActorScroller::DrawPrimitives()
|
||||
|
||||
@@ -29,7 +29,7 @@ protected:
|
||||
bool m_bLoaded;
|
||||
float m_fCurrentItem; // usually between 0 and m_SubActors.size()
|
||||
float m_fDestinationItem;
|
||||
float m_fSecondsPerItem;
|
||||
float m_fSecondsPerItem; // <= 0 means don't scroll
|
||||
int m_iNumItemsToDraw;
|
||||
|
||||
// Note: Rotation is applied before translation.
|
||||
|
||||
Reference in New Issue
Block a user