From a2b10b881ac4cfc15e05dc7fd1fd08cb1401b63c Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 17 Dec 2003 10:21:31 +0000 Subject: [PATCH] add PlayerName --- stepmania/src/ScreenGameplay.cpp | 14 ++++++++++++++ stepmania/src/ScreenGameplay.h | 1 + 2 files changed, 15 insertions(+) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 1eef5ebc3a..7962684cc3 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -46,6 +46,7 @@ #include "NoteDataUtil.h" #include "UnlockSystem.h" #include "LightsManager.h" +#include "ProfileManager.h" // // Defines @@ -475,6 +476,15 @@ ScreenGameplay::ScreenGameplay( CString sName, bool bDemonstration ) : Screen("S SET_XY( m_textCourseSongNumber[p] ); m_textCourseSongNumber[p].SetText( "" ); m_textCourseSongNumber[p].SetDiffuse( RageColor(0,0.5f,1,1) ); // light blue + + if( GAMESTATE->m_PlayMode == PLAY_MODE_RAVE ) + { + m_textPlayerName[p].LoadFromFont( THEME->GetPathToF("ScreenGameplay player") ); + m_textPlayerName[p].SetName( ssprintf("PlayerNameP%i",p+1) ); + m_textPlayerName[p].SetText( PROFILEMAN->GetPlayerName((PlayerNumber)p) ); + SET_XY( m_textPlayerName[p] ); + this->AddChild( &m_textPlayerName[p] ); + } } switch( GAMESTATE->m_PlayMode ) @@ -2112,6 +2122,8 @@ void ScreenGameplay::TweenOnScreen() if( !GAMESTATE->IsPlayerEnabled(p) ) continue; ON_COMMAND( m_textCourseSongNumber[p] ); + if( GAMESTATE->m_PlayMode == PLAY_MODE_RAVE ) + ON_COMMAND( m_textPlayerName[p] ); if( m_pPrimaryScoreDisplay[p] ) ON_COMMAND( *m_pPrimaryScoreDisplay[p] ); if( m_pSecondaryScoreDisplay[p] ) @@ -2137,6 +2149,8 @@ void ScreenGameplay::TweenOffScreen() if( !GAMESTATE->IsPlayerEnabled(p) ) continue; OFF_COMMAND( m_textCourseSongNumber[p] ); + if( GAMESTATE->m_PlayMode == PLAY_MODE_RAVE ) + OFF_COMMAND( m_textPlayerName[p] ); if( m_pPrimaryScoreDisplay[p] ) OFF_COMMAND( *m_pPrimaryScoreDisplay[p] ); if( m_pSecondaryScoreDisplay[p] ) diff --git a/stepmania/src/ScreenGameplay.h b/stepmania/src/ScreenGameplay.h index 3090d485aa..9fba75ebf0 100644 --- a/stepmania/src/ScreenGameplay.h +++ b/stepmania/src/ScreenGameplay.h @@ -110,6 +110,7 @@ protected: CombinedLifeMeter* m_pCombinedLifeMeter; Sprite m_sprStage; BitmapText m_textCourseSongNumber[NUM_PLAYERS]; + BitmapText m_textPlayerName[NUM_PLAYERS]; BPMDisplay m_BPMDisplay;