split out DrawGrayBar

protected:
This commit is contained in:
Glenn Maynard
2005-05-05 02:48:46 +00:00
parent c307b50c61
commit ac55b2d24f
2 changed files with 15 additions and 9 deletions
+13 -8
View File
@@ -79,18 +79,23 @@ void WheelItemBase::Update( float fDeltaTime )
Actor::Update( fDeltaTime ); Actor::Update( fDeltaTime );
} }
void WheelItemBase::DrawGrayBar( Sprite& bar )
{
if( m_fPercentGray == 0 )
return;
bar.SetGlow( RageColor(0,0,0,m_fPercentGray) );
bar.SetDiffuse( RageColor(0,0,0,0) );
bar.Draw();
bar.SetDiffuse( RageColor(0,0,0,1) );
bar.SetGlow( RageColor(0,0,0,0) );
}
void WheelItemBase::DrawPrimitives(Sprite& bar) void WheelItemBase::DrawPrimitives(Sprite& bar)
{ {
ActorFrame::DrawPrimitives(); ActorFrame::DrawPrimitives();
if( m_fPercentGray > 0 ) DrawGrayBar( bar );
{
bar.SetGlow( RageColor(0,0,0,m_fPercentGray) );
bar.SetDiffuse( RageColor(0,0,0,0) );
bar.Draw();
bar.SetDiffuse( RageColor(0,0,0,1) );
bar.SetGlow( RageColor(0,0,0,0) );
}
} }
/* /*
+2 -1
View File
@@ -35,11 +35,13 @@ public:
virtual void DrawPrimitives() { DrawPrimitives( m_sprBar ); } virtual void DrawPrimitives() { DrawPrimitives( m_sprBar ); }
void Load( CString sType ); void Load( CString sType );
void DrawGrayBar( Sprite& bar );
virtual void LoadFromWheelItemBaseData( WheelItemBaseData* pWID ); virtual void LoadFromWheelItemBaseData( WheelItemBaseData* pWID );
float m_fPercentGray; float m_fPercentGray;
protected:
Sprite m_sprBar; Sprite m_sprBar;
BitmapText m_text; BitmapText m_text;
WheelItemType m_Type; WheelItemType m_Type;
@@ -49,7 +51,6 @@ public:
ThemeMetric<float> TEXT_Y; ThemeMetric<float> TEXT_Y;
ThemeMetric<float> TEXT_WIDTH; ThemeMetric<float> TEXT_WIDTH;
ThemeMetric<apActorCommands> TEXT_ON_COMMAND; ThemeMetric<apActorCommands> TEXT_ON_COMMAND;
}; };
struct WheelItemBaseData struct WheelItemBaseData