add Actor::hidden flag (better than hiding by setting diffusealpha=0)
This commit is contained in:
@@ -46,6 +46,7 @@ void Actor::Reset()
|
||||
m_effectColor1 = RageColor(1,1,1,1);
|
||||
m_effectColor2 = RageColor(1,1,1,1);
|
||||
|
||||
m_bHidden = false;
|
||||
m_bShadow = false;
|
||||
m_fShadowLength = 4;
|
||||
m_bIsAnimating = true;
|
||||
@@ -66,6 +67,9 @@ Actor::Actor()
|
||||
|
||||
void Actor::Draw()
|
||||
{
|
||||
if( m_bHidden )
|
||||
return; // early abort
|
||||
|
||||
// call the most-derived versions
|
||||
this->BeginDraw();
|
||||
this->DrawPrimitives(); // call the most-derived version of DrawPrimitives();
|
||||
|
||||
@@ -240,6 +240,7 @@ public:
|
||||
//
|
||||
// other properties
|
||||
//
|
||||
void SetHidden( bool b ) { m_bHidden = b; }
|
||||
void SetShadowLength( float fLength );
|
||||
void EnableShadow( bool b ) { m_bShadow = b; }
|
||||
|
||||
@@ -324,6 +325,7 @@ protected:
|
||||
//
|
||||
// other properties
|
||||
//
|
||||
bool m_bHidden;
|
||||
bool m_bShadow;
|
||||
float m_fShadowLength;
|
||||
bool m_bIsAnimating;
|
||||
|
||||
@@ -533,25 +533,28 @@ void ScreenRanking::SetPage( PageToShow pts )
|
||||
|
||||
|
||||
if( pSteps == NULL )
|
||||
{
|
||||
// set alpha to 0.0 and continue
|
||||
m_sprDiffHeaders[d].SetDiffuse( RageColor(1,1,1,0) );
|
||||
continue;
|
||||
}
|
||||
|
||||
// set the header visible
|
||||
m_sprDiffHeaders[d].SetDiffuse( RageColor(1,1,1,1) );
|
||||
m_sprDiffHeaders[d].SetHidden( true );
|
||||
else
|
||||
m_sprDiffHeaders[d].SetDiffuse( RageColor(1,1,1,1) );
|
||||
|
||||
for( int l=0; l<NUM_RANKING_LINES; l++ )
|
||||
{
|
||||
Steps::MemCardData::HighScore hs;
|
||||
if( l < (int)pSteps->m_MemCardDatas[MEMORY_CARD_MACHINE].vHighScores.size() )
|
||||
hs = pSteps->m_MemCardDatas[MEMORY_CARD_MACHINE].vHighScores[l];
|
||||
if( hs.sName.empty() )
|
||||
hs.sName = EMPTY_SCORE_NAME;
|
||||
if( pSteps == NULL )
|
||||
{
|
||||
m_textPercent[l][d].SetHidden( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
Steps::MemCardData::HighScore hs;
|
||||
if( l < (int)pSteps->m_MemCardDatas[MEMORY_CARD_MACHINE].vHighScores.size() )
|
||||
hs = pSteps->m_MemCardDatas[MEMORY_CARD_MACHINE].vHighScores[l];
|
||||
if( hs.sName.empty() )
|
||||
hs.sName = EMPTY_SCORE_NAME;
|
||||
|
||||
m_textPercent[l][d].SetText( ssprintf("%s\n%0.3f%%", hs.sName.c_str(), hs.fPercentDP*100) );
|
||||
m_textPercent[l][d].SetDiffuse( TEXT_COLOR(pts.colorIndex) );
|
||||
m_textPercent[l][d].SetText( ssprintf("%s\n%0.3f%%", hs.sName.c_str(), hs.fPercentDP*100) );
|
||||
m_textPercent[l][d].SetText( ssprintf("%s\n%0.3f%%", hs.sName.c_str(), hs.fPercentDP*100) );
|
||||
m_textPercent[l][d].SetDiffuse( TEXT_COLOR(pts.colorIndex) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user