add stream separator to CombinedLifeMeterTug

This commit is contained in:
Chris Danford
2003-11-27 08:02:36 +00:00
parent b716ee6680
commit 4343594040
4 changed files with 12 additions and 3 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

+7
View File
@@ -33,6 +33,9 @@ CombinedLifeMeterTug::CombinedLifeMeterTug()
}
m_Stream[PLAYER_2].SetZoomX( -1 );
m_sprSeparator.Load( THEME->GetPathToG(ssprintf("CombinedLifeMeterTug separator")) );
this->AddChild( &m_sprSeparator );
m_sprFrame.Load( THEME->GetPathToG(ssprintf("CombinedLifeMeterTug frame")) );
this->AddChild( &m_sprFrame );
@@ -53,6 +56,10 @@ void CombinedLifeMeterTug::Update( float fDelta )
m_Stream[PLAYER_1].SetPercent( GAMESTATE->m_fTugLifePercentP1 );
m_Stream[PLAYER_2].SetPercent( 1-GAMESTATE->m_fTugLifePercentP1 );
float fSeparatorX = SCALE( GAMESTATE->m_fTugLifePercentP1, 0.f, 1.f, -METER_WIDTH/2.f, +METER_WIDTH/2.f );
m_sprSeparator.SetX( fSeparatorX );
ActorFrame::Update( fDelta );
}
+2 -1
View File
@@ -34,7 +34,8 @@ public:
protected:
MeterDisplay m_Stream[NUM_PLAYERS];
Sprite m_sprFrame;
Sprite m_sprSeparator;
Sprite m_sprFrame;
CharacterHead m_Head[NUM_PLAYERS];
};
+3 -2
View File
@@ -37,11 +37,12 @@ ScoreDisplayRave::ScoreDisplayRave()
this->AddChild( &m_sprMeter[i] );
}
this->AddChild( &m_sprFrameOverlay );
m_textLevel.LoadFromNumbers( THEME->GetPathToN("ScoreDisplayRave level") );
m_textLevel.SetText( "1" );
m_textLevel.SetShadowLength( 0 );
this->AddChild( &m_textLevel );
this->AddChild( &m_sprFrameOverlay );
}
void ScoreDisplayRave::Init( PlayerNumber pn )