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_effectColor1 = RageColor(1,1,1,1);
|
||||||
m_effectColor2 = RageColor(1,1,1,1);
|
m_effectColor2 = RageColor(1,1,1,1);
|
||||||
|
|
||||||
|
m_bHidden = false;
|
||||||
m_bShadow = false;
|
m_bShadow = false;
|
||||||
m_fShadowLength = 4;
|
m_fShadowLength = 4;
|
||||||
m_bIsAnimating = true;
|
m_bIsAnimating = true;
|
||||||
@@ -66,6 +67,9 @@ Actor::Actor()
|
|||||||
|
|
||||||
void Actor::Draw()
|
void Actor::Draw()
|
||||||
{
|
{
|
||||||
|
if( m_bHidden )
|
||||||
|
return; // early abort
|
||||||
|
|
||||||
// call the most-derived versions
|
// call the most-derived versions
|
||||||
this->BeginDraw();
|
this->BeginDraw();
|
||||||
this->DrawPrimitives(); // call the most-derived version of DrawPrimitives();
|
this->DrawPrimitives(); // call the most-derived version of DrawPrimitives();
|
||||||
|
|||||||
@@ -240,6 +240,7 @@ public:
|
|||||||
//
|
//
|
||||||
// other properties
|
// other properties
|
||||||
//
|
//
|
||||||
|
void SetHidden( bool b ) { m_bHidden = b; }
|
||||||
void SetShadowLength( float fLength );
|
void SetShadowLength( float fLength );
|
||||||
void EnableShadow( bool b ) { m_bShadow = b; }
|
void EnableShadow( bool b ) { m_bShadow = b; }
|
||||||
|
|
||||||
@@ -324,6 +325,7 @@ protected:
|
|||||||
//
|
//
|
||||||
// other properties
|
// other properties
|
||||||
//
|
//
|
||||||
|
bool m_bHidden;
|
||||||
bool m_bShadow;
|
bool m_bShadow;
|
||||||
float m_fShadowLength;
|
float m_fShadowLength;
|
||||||
bool m_bIsAnimating;
|
bool m_bIsAnimating;
|
||||||
|
|||||||
@@ -533,16 +533,17 @@ void ScreenRanking::SetPage( PageToShow pts )
|
|||||||
|
|
||||||
|
|
||||||
if( pSteps == NULL )
|
if( pSteps == NULL )
|
||||||
{
|
m_sprDiffHeaders[d].SetHidden( true );
|
||||||
// set alpha to 0.0 and continue
|
else
|
||||||
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].SetDiffuse( RageColor(1,1,1,1) );
|
||||||
|
|
||||||
for( int l=0; l<NUM_RANKING_LINES; l++ )
|
for( int l=0; l<NUM_RANKING_LINES; l++ )
|
||||||
|
{
|
||||||
|
if( pSteps == NULL )
|
||||||
|
{
|
||||||
|
m_textPercent[l][d].SetHidden( true );
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
Steps::MemCardData::HighScore hs;
|
Steps::MemCardData::HighScore hs;
|
||||||
if( l < (int)pSteps->m_MemCardDatas[MEMORY_CARD_MACHINE].vHighScores.size() )
|
if( l < (int)pSteps->m_MemCardDatas[MEMORY_CARD_MACHINE].vHighScores.size() )
|
||||||
@@ -550,11 +551,13 @@ void ScreenRanking::SetPage( PageToShow pts )
|
|||||||
if( hs.sName.empty() )
|
if( hs.sName.empty() )
|
||||||
hs.sName = EMPTY_SCORE_NAME;
|
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].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) );
|
m_textPercent[l][d].SetDiffuse( TEXT_COLOR(pts.colorIndex) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user