fix FadingBanner when scrolling is on (scrolling was being reset

during the fade)
This commit is contained in:
Glenn Maynard
2002-12-16 07:33:32 +00:00
parent 12f88d0384
commit 6045fb0dd8
3 changed files with 13 additions and 4 deletions
+9
View File
@@ -53,6 +53,15 @@ void Banner::Update( float fDeltaTime )
}
}
void Banner::SetScrolling( bool bScroll, float Percent)
{
m_bScrolling = bScroll;
m_fPercentScrolling = Percent;
/* Set up the texture coord rects for the current state. */
Update(0);
}
bool Banner::LoadFromSong( Song* pSong ) // NULL means no song
{
m_bScrolling = false;
+3 -2
View File
@@ -31,8 +31,9 @@ public:
bool LoadFromCourse( Course* pCourse );
bool LoadRoulette();
inline void SetScrolling( bool bScroll ) { m_bScrolling = bScroll; };
inline bool IsScrolling() { return m_bScrolling; };
void SetScrolling( bool bScroll, float Percent = 0);
bool IsScrolling() { return m_bScrolling; }
float ScrollingPercent() { return m_fPercentScrolling; }
protected:
bool m_bScrolling;
+1 -2
View File
@@ -44,14 +44,13 @@ void FadingBanner::BeforeChange()
if( m_Banner[0].GetTexturePath() != "" )
{
m_Banner[1].Load( m_Banner[0].GetTexturePath() );
m_Banner[1].SetScrolling( m_Banner[0].IsScrolling() );
m_Banner[1].SetScrolling( m_Banner[0].IsScrolling(), m_Banner[0].ScrollingPercent() );
}
m_Banner[1].SetDiffuse( RageColor(1,1,1,1) );
m_Banner[1].StopTweening();
m_Banner[1].BeginTweening( 0.25f ); // fade out
m_Banner[1].SetTweenDiffuse( RageColor(1,1,1,0) );
}
void FadingBanner::SetFromSong( Song* pSong )