diff --git a/stepmania/src/DateTime.cpp b/stepmania/src/DateTime.cpp index d8c0d9d50b..f4ea9d32b4 100644 --- a/stepmania/src/DateTime.cpp +++ b/stepmania/src/DateTime.cpp @@ -181,6 +181,33 @@ CString LastWeekToString( int iLastWeekIndex ) } } +CString LastDayToDisplayString( int iLastDayIndex ) +{ + CString s = LastDayToString( iLastDayIndex ); + s.Replace( "Day", "" ); + s.Replace( "Ago", " Ago" ); + return s; +} + +CString LastWeekToDisplayString( int iLastWeekIndex ) +{ + CString s = LastWeekToString( iLastWeekIndex ); + s.Replace( "Week", "" ); + s.Replace( "Ago", " Ago" ); + return s; +} + +CString HourInDayToDisplayString( int iHourIndex ) +{ + int iBeginHour = iHourIndex; + iBeginHour--; + wrap( iBeginHour, 24 ); + iBeginHour++; + + return ssprintf("%02d:00+", iBeginHour ); +} + + tm AddDays( tm start, int iDaysToMove ) { /* diff --git a/stepmania/src/DateTime.h b/stepmania/src/DateTime.h index e93af4617d..778f11b034 100644 --- a/stepmania/src/DateTime.h +++ b/stepmania/src/DateTime.h @@ -17,6 +17,10 @@ CString HourInDayToString( int iHourIndex ); CString MonthToString( int iMonthIndex ); CString LastWeekToString( int iLastWeekIndex ); +CString LastDayToDisplayString( int iLastDayIndex ); +CString LastWeekToDisplayString( int iLastWeekIndex ); +CString HourInDayToDisplayString( int iHourIndex ); + tm AddDays( tm start, int iDaysToMove ); tm GetYesterday( tm start ); int GetDayOfWeek( tm time ); diff --git a/stepmania/src/ScreenBookkeeping.cpp b/stepmania/src/ScreenBookkeeping.cpp index 7e9c3023e7..e99db1bc3d 100644 --- a/stepmania/src/ScreenBookkeeping.cpp +++ b/stepmania/src/ScreenBookkeeping.cpp @@ -55,9 +55,11 @@ ScreenBookkeeping::~ScreenBookkeeping() LOG->Trace( "ScreenBookkeeping::~ScreenBookkeeping()" ); } -void ScreenBookkeeping::DrawPrimitives() +void ScreenBookkeeping::Update( float fDelta ) { - Screen::DrawPrimitives(); + ChangeView( m_View ); // refresh so that counts change in real-time + + ScreenWithMenuElements::Update( fDelta ); } void ScreenBookkeeping::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ) @@ -143,7 +145,7 @@ void ScreenBookkeeping::ChangeView( View newView ) CString sTitle, sData; for( int i=0; i