From 2876292c4f4c848cf59a33196342db85a6dee220 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 18 Dec 2003 22:51:43 +0000 Subject: [PATCH] PlayerName --- .../Themes/default/Fonts/ScreenOptions player.redir | 1 + stepmania/Themes/default/metrics.ini | 8 ++++++++ stepmania/src/ScreenOptions.cpp | 10 ++++++++++ stepmania/src/ScreenOptions.h | 1 + 4 files changed, 20 insertions(+) create mode 100644 stepmania/Themes/default/Fonts/ScreenOptions player.redir diff --git a/stepmania/Themes/default/Fonts/ScreenOptions player.redir b/stepmania/Themes/default/Fonts/ScreenOptions player.redir new file mode 100644 index 0000000000..ce9b8c25f4 --- /dev/null +++ b/stepmania/Themes/default/Fonts/ScreenOptions player.redir @@ -0,0 +1 @@ +Common Normal diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 7d65730983..7dfec2ff9b 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -1854,6 +1854,14 @@ ExplanationTogetherOnCommand=wrapwidthpixels,1000;horizalign,left;cropright,1;li ExplanationZoom=0.5 ExplanationP1OnCommand=wrapwidthpixels,500;horizalign,left;cropright,1;linear,0.5;cropright,0 ExplanationP2OnCommand=wrapwidthpixels,500;horizalign,right;cropright,1;linear,0.5;cropright,0 +PlayerNameP1X=0 +PlayerNameP1Y=0 +PlayerNameP1OnCommand=hidden,1 +PlayerNameP1OffCommand= +PlayerNameP2X=0 +PlayerNameP2Y=0 +PlayerNameP2OnCommand=hidden,1 +PlayerNameP2OffCommand= ColorSelected=1,1,1,1 // normal ColorNotSelected=0.5,0.5,0.5,1 // grayed NumShownItems=10 diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index 822bbd15be..147a296b36 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -21,6 +21,7 @@ #include "ThemeManager.h" #include "InputMapper.h" #include "ActorUtil.h" +#include "ProfileManager.h" const float ITEM_X[NUM_PLAYERS] = { 260, 420 }; @@ -223,6 +224,15 @@ void ScreenOptions::Init( InputMode im, OptionRow OptionRows[], int iNumOptionLi m_framePage.AddChild( &m_textExplanation[p] ); } + for( p=0; pGetPathToF( "ScreenOptions player") ); + m_textPlayerName[p].SetName( ssprintf("PlayerNameP%i",p+1) ); + m_textPlayerName[p].SetText( PROFILEMAN->GetPlayerName((PlayerNumber)p) ); + UtilSetXYAndOnCommand( m_textPlayerName[p], "ScreenOptions" ); + m_framePage.AddChild( &m_textPlayerName[p] ); + } + if( SHOW_SCROLL_BAR ) { m_ScrollBar.SetName( "DualScrollBar", "ScrollBar" ); diff --git a/stepmania/src/ScreenOptions.h b/stepmania/src/ScreenOptions.h index 6281c3025c..6b7815fa05 100644 --- a/stepmania/src/ScreenOptions.h +++ b/stepmania/src/ScreenOptions.h @@ -124,6 +124,7 @@ protected: // derived classes need access to these OptionIcon m_OptionIcons[NUM_PLAYERS][MAX_OPTION_LINES]; OptionsCursor m_Highlight[NUM_PLAYERS]; + BitmapText m_textPlayerName[NUM_PLAYERS]; BitmapText m_textExplanation[NUM_PLAYERS]; DualScrollBar m_ScrollBar;