diff --git a/stepmania/Themes/default/Fonts/ScreenBookkeeping AllTime.redir b/stepmania/Themes/default/Fonts/ScreenBookkeeping AllTime.redir new file mode 100644 index 0000000000..ce9b8c25f4 --- /dev/null +++ b/stepmania/Themes/default/Fonts/ScreenBookkeeping AllTime.redir @@ -0,0 +1 @@ +Common Normal diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index a8100e6828..831289319c 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -2610,9 +2610,15 @@ Fallback=ScreenOptionsSubmenu [ScreenBookkeeping] Class=ScreenBookkeeping Fallback=ScreenOperatorMenu +AllTimeX=SCREEN_CENTER_X +AllTimeY=110 +AllTimeOnCommand=zoom,0.7;diffuseshift;EffectColor1,0.5,0.5,0.5,1 TitleX=SCREEN_CENTER_X -TitleY=60 +TitleY=140 TitleOnCommand=zoom,0.8 +DataX=0 +DataY=SCREEN_CENTER_Y+16 +DataOnCommand=zoom,0.6 [ScreenPackages] Class=ScreenPackages diff --git a/stepmania/src/ScreenBookkeeping.cpp b/stepmania/src/ScreenBookkeeping.cpp index bb33555980..7e9c3023e7 100644 --- a/stepmania/src/ScreenBookkeeping.cpp +++ b/stepmania/src/ScreenBookkeeping.cpp @@ -25,6 +25,11 @@ void ScreenBookkeeping::Init() { ScreenWithMenuElements::Init(); + m_textAllTime.LoadFromFont( THEME->GetPathF(m_sName,"AllTime") ); + m_textAllTime.SetName( "AllTime" ); + SET_XY_AND_ON_COMMAND( m_textAllTime ); + this->AddChild( &m_textAllTime ); + m_textTitle.LoadFromFont( THEME->GetPathF(m_sName,"title") ); m_textTitle.SetName( "Title" ); SET_XY_AND_ON_COMMAND( m_textTitle ); @@ -32,13 +37,12 @@ void ScreenBookkeeping::Init() for( int i=0; iGetPathF(m_sName,"data") ); + m_textData[i].SetName( "Data" ); + SET_XY_AND_ON_COMMAND( m_textData[i] ); float fX = SCALE( i, 0.f, NUM_BOOKKEEPING_COLS-1, SCREEN_LEFT+50, SCREEN_RIGHT-160 ); - float fY = SCREEN_CENTER_Y+16; - m_textCols[i].LoadFromFont( THEME->GetPathF(m_sName,"data") ); - m_textCols[i].SetName( ssprintf("Data%d",i+1) ); - m_textCols[i].SetXY( fX, fY ); - m_textCols[i].SetZoom( 0.6f ); - this->AddChild( &m_textCols[i] ); + m_textData[i].SetX( fX ); + this->AddChild( &m_textData[i] ); } ChangeView( (View)0 ); @@ -118,6 +122,14 @@ void ScreenBookkeeping::ChangeView( View newView ) { m_View = newView; + + { + CString s; + s += "All-time Total: "; + s += ssprintf( "%i\n", BOOKKEEPER->GetCoinsTotal() ); + m_textAllTime.SetText( s ); + } + switch( m_View ) { case VIEW_LAST_DAYS: @@ -129,17 +141,6 @@ void ScreenBookkeeping::ChangeView( View newView ) int iTotalLast = 0; CString sTitle, sData; - - sTitle += "All-time Total\n"; - sData += ssprintf( "%i\n", BOOKKEEPER->GetCoinsTotal() ); - - sTitle += "Daily Average\n"; - float fAverage = iTotalLast/(float)NUM_LAST_DAYS; - sData += ssprintf("%.1f\n",fAverage); - - sTitle += "\n"; - sData += "\n"; - for( int i=0; i