Merge pull request #37 from kyzentun/ComboGraph_height_fix

ComboGraph height fix
This commit is contained in:
Jason Felds
2014-02-13 21:32:21 -05:00
3 changed files with 10 additions and 0 deletions
+1
View File
@@ -4423,6 +4423,7 @@ BodyHeight=38
[ComboGraph] [ComboGraph]
BodyWidth=140 BodyWidth=140
BodyHeight=11
# Arcade ################################# # Arcade #################################
[ScreenLogo] [ScreenLogo]
+8
View File
@@ -22,6 +22,11 @@ ComboGraph::ComboGraph()
void ComboGraph::Load( RString sMetricsGroup ) void ComboGraph::Load( RString sMetricsGroup )
{ {
BODY_WIDTH.Load( sMetricsGroup, "BodyWidth" ); BODY_WIDTH.Load( sMetricsGroup, "BodyWidth" );
BODY_HEIGHT.Load( sMetricsGroup, "BodyHeight" );
// These need to be set so that a theme can use zoomtowidth/zoomtoheight and get correct behavior.
this->SetWidth(BODY_WIDTH);
this->SetHeight(BODY_HEIGHT);
Actor *pActor = NULL; Actor *pActor = NULL;
@@ -29,6 +34,7 @@ void ComboGraph::Load( RString sMetricsGroup )
if( m_pBacking != NULL ) if( m_pBacking != NULL )
{ {
m_pBacking->ZoomToWidth( BODY_WIDTH ); m_pBacking->ZoomToWidth( BODY_WIDTH );
m_pBacking->ZoomToHeight( BODY_HEIGHT );
this->AddChild( m_pBacking ); this->AddChild( m_pBacking );
} }
@@ -36,6 +42,7 @@ void ComboGraph::Load( RString sMetricsGroup )
if( m_pNormalCombo != NULL ) if( m_pNormalCombo != NULL )
{ {
m_pNormalCombo->ZoomToWidth( BODY_WIDTH ); m_pNormalCombo->ZoomToWidth( BODY_WIDTH );
m_pNormalCombo->ZoomToHeight( BODY_HEIGHT );
this->AddChild( m_pNormalCombo ); this->AddChild( m_pNormalCombo );
} }
@@ -43,6 +50,7 @@ void ComboGraph::Load( RString sMetricsGroup )
if( m_pMaxCombo != NULL ) if( m_pMaxCombo != NULL )
{ {
m_pMaxCombo->ZoomToWidth( BODY_WIDTH ); m_pMaxCombo->ZoomToWidth( BODY_WIDTH );
m_pMaxCombo->ZoomToHeight( BODY_HEIGHT );
this->AddChild( m_pMaxCombo ); this->AddChild( m_pMaxCombo );
} }
+1
View File
@@ -24,6 +24,7 @@ public:
private: private:
ThemeMetric<float> BODY_WIDTH; ThemeMetric<float> BODY_WIDTH;
ThemeMetric<float> BODY_HEIGHT;
Actor *m_pBacking; Actor *m_pBacking;
Actor *m_pNormalCombo; Actor *m_pNormalCombo;
Actor *m_pMaxCombo; Actor *m_pMaxCombo;