center text in ComboGraph

This commit is contained in:
Chris Danford
2005-04-05 10:48:08 +00:00
parent 62a2834202
commit f98638e27e
2 changed files with 8 additions and 1 deletions
+4
View File
@@ -6,9 +6,12 @@
#include "ActorUtil.h"
#include "BitmapText.h"
#include "Sprite.h"
#include "ThemeMetric.h"
const int MinComboSizeToShow = 5;
static ThemeMetric<float> NUMBERS_Y("ComboGraph","NumbersY");
void ComboGraph::Load( const CString& sScreen, const CString& sElement, const StageStats &s, PlayerNumber pn )
{
ASSERT( m_SubActors.size() == 0 );
@@ -71,6 +74,7 @@ void ComboGraph::Load( const CString& sScreen, const CString& sElement, const St
const float CenterPercent = start + size/2;
const float CenterXPos = SCALE( CenterPercent, 0.0f, 1.0f, -width/2.0f, width/2.0f );
text->SetX( CenterXPos );
text->SetY( NUMBERS_Y );
text->SetText( ssprintf("%i",combo.GetStageCnt()) );
ON_COMMAND( text );