From e00b1bbac9f96a0a87a09051552cbc1094a54243 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Fri, 29 Apr 2005 07:11:20 +0000 Subject: [PATCH] add date to high score wheel --- stepmania/src/ScreenNameEntryTraditional.cpp | 9 +++++++++ stepmania/src/ScreenNameEntryTraditional.h | 1 + 2 files changed, 10 insertions(+) diff --git a/stepmania/src/ScreenNameEntryTraditional.cpp b/stepmania/src/ScreenNameEntryTraditional.cpp index b73a23499d..4b50b54feb 100644 --- a/stepmania/src/ScreenNameEntryTraditional.cpp +++ b/stepmania/src/ScreenNameEntryTraditional.cpp @@ -69,6 +69,13 @@ void HighScoreWheelItem::Load( int iRankIndex, const HighScore& hs ) m_textScore.SetShadowLength( 2 ); this->AddChild( &m_textScore ); SET_XY_AND_ON_COMMAND( m_textScore ); + + m_textDate.SetName( "Date" ); + m_textDate.LoadFromFont( THEME->GetPathF(m_sName,"date") ); + m_textDate.SetText( ssprintf("%02d/%02d", hs.dateTime.tm_mon+1, hs.dateTime.tm_mday) ); + m_textDate.SetShadowLength( 2 ); + this->AddChild( &m_textDate ); + SET_XY_AND_ON_COMMAND( m_textDate ); } void HighScoreWheelItem::LoadBlank( int iRankIndex ) @@ -83,6 +90,7 @@ void HighScoreWheelItem::ShowFocus() m_textRank.RunCommands( c ); m_textName.RunCommands( c ); m_textScore.RunCommands( c ); + m_textDate.RunCommands( c ); } void HighScoreWheel::Load( const HighScoreList& hsl, int iIndexToFocus ) @@ -160,6 +168,7 @@ ScreenNameEntryTraditional::ScreenNameEntryTraditional( CString sClassName ) : S hs.grade = GRADE_TIER03; hs.fPercentDP = ss.m_player[p].GetPercentDancePoints(); hs.iScore = ss.m_player[p].iScore; + hs.dateTime = DateTime::GetNowDateTime(); int a, b; PROFILEMAN->AddStepsScore( ss.vpPlayedSongs[0], pSteps, p, hs, a, b ); PROFILEMAN->AddStepsScore( ss.vpPlayedSongs[0], pSteps, p, hs, a, b ); diff --git a/stepmania/src/ScreenNameEntryTraditional.h b/stepmania/src/ScreenNameEntryTraditional.h index 16c860f8f0..21c37346e4 100644 --- a/stepmania/src/ScreenNameEntryTraditional.h +++ b/stepmania/src/ScreenNameEntryTraditional.h @@ -26,6 +26,7 @@ public: BitmapText m_textRank; BitmapText m_textName; BitmapText m_textScore; + BitmapText m_textDate; }; class HighScoreWheel : public ActorScroller