diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index 1bcdb34dc6..2d023d2b2f 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -232,16 +232,7 @@ void ScreenOptions::Init( InputMode im, OptionRow OptionRows[], int iNumOptionLi // poke once at all the explanation metrics so that we catch missing ones early for( r=0; rGetMetric(m_sName,sLineName); - } - + GetExplanationText( r ); CHECKPOINT; @@ -287,6 +278,16 @@ ScreenOptions::~ScreenOptions() delete m_textItems[i][j]; } +CString ScreenOptions::GetExplanationText( int row ) const +{ + CString sLineName = m_OptionRow[row].name; + if( sLineName=="" ) + sLineName = m_OptionRow[row].choices[0]; + sLineName.Replace("\n-",""); + sLineName.Replace("\n",""); + sLineName.Replace(" ",""); + return THEME->GetMetric( m_sName,sLineName ); +} BitmapText &ScreenOptions::GetTextItemForRow( PlayerNumber pn, int iRow ) { @@ -753,19 +754,9 @@ void ScreenOptions::OnChange( PlayerNumber pn ) } if( bIsExitRow ) - { pText->SetText( "" ); - } else - { - CString sLineName = m_OptionRow[iCurRow].name; - if( sLineName=="" ) - sLineName = m_OptionRow[iCurRow].choices[0]; - sLineName.Replace("\n-",""); - sLineName.Replace("\n",""); - sLineName.Replace(" ",""); - pText->SetText( THEME->GetMetric(m_sName,sLineName) ); - } + pText->SetText( GetExplanationText(iCurRow) ); } diff --git a/stepmania/src/ScreenOptions.h b/stepmania/src/ScreenOptions.h index 4c1b46bc9a..abb26b0aa6 100644 --- a/stepmania/src/ScreenOptions.h +++ b/stepmania/src/ScreenOptions.h @@ -67,6 +67,7 @@ protected: virtual void ExportOptions() = 0; void InitOptionsText(); void GetWidthXY( PlayerNumber pn, int iRow, int &iWidthOut, int &iXOut, int &iYOut ); + CString GetExplanationText( int row ) const; BitmapText &GetTextItemForRow( PlayerNumber pn, int iRow ); void PositionUnderlines(); void PositionIcons();