center text in ComboGraph
This commit is contained in:
@@ -4437,3 +4437,6 @@ Answer3Of3Text=CANCEL
|
|||||||
|
|
||||||
[GameState]
|
[GameState]
|
||||||
UseNameBlacklist=0
|
UseNameBlacklist=0
|
||||||
|
|
||||||
|
[ComboGraph]
|
||||||
|
NumbersY=0
|
||||||
|
|||||||
@@ -6,9 +6,12 @@
|
|||||||
#include "ActorUtil.h"
|
#include "ActorUtil.h"
|
||||||
#include "BitmapText.h"
|
#include "BitmapText.h"
|
||||||
#include "Sprite.h"
|
#include "Sprite.h"
|
||||||
|
#include "ThemeMetric.h"
|
||||||
|
|
||||||
const int MinComboSizeToShow = 5;
|
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 )
|
void ComboGraph::Load( const CString& sScreen, const CString& sElement, const StageStats &s, PlayerNumber pn )
|
||||||
{
|
{
|
||||||
ASSERT( m_SubActors.size() == 0 );
|
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 CenterPercent = start + size/2;
|
||||||
const float CenterXPos = SCALE( CenterPercent, 0.0f, 1.0f, -width/2.0f, width/2.0f );
|
const float CenterXPos = SCALE( CenterPercent, 0.0f, 1.0f, -width/2.0f, width/2.0f );
|
||||||
text->SetX( CenterXPos );
|
text->SetX( CenterXPos );
|
||||||
|
text->SetY( NUMBERS_Y );
|
||||||
|
|
||||||
text->SetText( ssprintf("%i",combo.GetStageCnt()) );
|
text->SetText( ssprintf("%i",combo.GetStageCnt()) );
|
||||||
ON_COMMAND( text );
|
ON_COMMAND( text );
|
||||||
|
|||||||
Reference in New Issue
Block a user