diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index 2d023d2b2f..10c45329cd 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -232,7 +232,11 @@ 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 ); + return THEME->GetMetric( "OptionExplanations", sLineName+"Help" ); +} + +CString ScreenOptions::GetExplanationTitle( int row ) const +{ + CString sLineName = m_OptionRow[row].name; + sLineName.Replace("\n-",""); + sLineName.Replace("\n",""); + sLineName.Replace(" ",""); + return THEME->GetMetric( "OptionExplanations", sLineName+"Title" ); } BitmapText &ScreenOptions::GetTextItemForRow( PlayerNumber pn, int iRow ) @@ -330,14 +341,12 @@ void ScreenOptions::InitOptionsText() { for( int i=0; iGetPathToF("ScreenOptions title") ); - CString sText = optline.title; + CString sText = GetExplanationTitle( i ); title.SetText( sText ); title.SetXY( LABELS_X, fY ); diff --git a/stepmania/src/ScreenOptions.h b/stepmania/src/ScreenOptions.h index abb26b0aa6..ce21f77af5 100644 --- a/stepmania/src/ScreenOptions.h +++ b/stepmania/src/ScreenOptions.h @@ -27,7 +27,6 @@ const unsigned MAX_OPTION_LINES = 40; struct OptionRow { CString name; - CString title; bool bOneChoiceForAllPlayers; vector choices; @@ -36,7 +35,6 @@ struct OptionRow OptionRow( const char *n, int b, const char *c0=NULL, const char *c1=NULL, const char *c2=NULL, const char *c3=NULL, const char *c4=NULL, const char *c5=NULL, const char *c6=NULL, const char *c7=NULL, const char *c8=NULL, const char *c9=NULL, const char *c10=NULL, const char *c11=NULL, const char *c12=NULL, const char *c13=NULL, const char *c14=NULL, const char *c15=NULL, const char *c16=NULL, const char *c17=NULL, const char *c18=NULL, const char *c19=NULL ) { name = n; - title = n; bOneChoiceForAllPlayers = !!b; #define PUSH( c ) if(c) choices.push_back(c); PUSH(c0);PUSH(c1);PUSH(c2);PUSH(c3);PUSH(c4);PUSH(c5);PUSH(c6);PUSH(c7);PUSH(c8);PUSH(c9);PUSH(c10);PUSH(c11);PUSH(c12);PUSH(c13);PUSH(c14);PUSH(c15);PUSH(c16);PUSH(c17);PUSH(c18);PUSH(c19); @@ -68,6 +66,7 @@ protected: void InitOptionsText(); void GetWidthXY( PlayerNumber pn, int iRow, int &iWidthOut, int &iXOut, int &iYOut ); CString GetExplanationText( int row ) const; + CString GetExplanationTitle( int row ) const; BitmapText &GetTextItemForRow( PlayerNumber pn, int iRow ); void PositionUnderlines(); void PositionIcons(); diff --git a/stepmania/src/ScreenOptionsMaster.cpp b/stepmania/src/ScreenOptionsMaster.cpp index 67271bfc22..826777481c 100644 --- a/stepmania/src/ScreenOptionsMaster.cpp +++ b/stepmania/src/ScreenOptionsMaster.cpp @@ -231,7 +231,6 @@ ScreenOptionsMaster::ScreenOptionsMaster( CString sClassName ): RageException::Throw( "Parse error in %s::Line%i", m_sName.c_str(), i+1 ); OptionRowHandler hand; - bool TitleSetExplicitly = false; for( unsigned part = 0; part < asParts.size(); ++part) { CStringArray asBits; @@ -240,12 +239,7 @@ ScreenOptionsMaster::ScreenOptionsMaster( CString sClassName ): const CString name = asBits[0]; const CString param = asBits.size() > 1? asBits[1]: ""; - if( !name.CompareNoCase("title") ) - { - TitleSetExplicitly = true; - row.title = param; - } - else if( !name.CompareNoCase("list") ) + if( !name.CompareNoCase("list") ) { SetList( row, hand, param, row.name ); } @@ -265,9 +259,6 @@ ScreenOptionsMaster::ScreenOptionsMaster( CString sClassName ): } else RageException::Throw( "Unexpected type '%s' in %s::Line%i", name.c_str(), m_sName.c_str(), i ); - - if( !TitleSetExplicitly ) - row.title = row.name; } OptionRowHandlers.push_back( hand ); } @@ -611,6 +602,10 @@ void ScreenOptionsMaster::RefreshIcons() break; } + /* XXX: hack to not display text in the song options menu */ + if( row.bOneChoiceForAllPlayers ) + sIcon = ""; + icon.Load( (PlayerNumber)p, sIcon, false ); } }