diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index baf4adf679..70d07def3f 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -960,6 +960,36 @@ void ScreenOptions::StoreFocus( PlayerNumber pn ) m_iCurrentRow[pn], row.GetChoiceInRowWithFocus(pn), m_iFocusX[pn]); } +void ScreenOptions::BeginFadingOut() +{ + /* If the selection is on a LIST, and the selected LIST option sets the screen, + * honor it. */ + int iCurRow = this->GetCurrentRow(); + ASSERT( iCurRow >= 0 && iCurRow < (int)m_pRows.size() ); + const OptionRow &row = *m_pRows[iCurRow]; + + { + int iChoice = row.GetChoiceInRowWithFocus( GAMESTATE->m_MasterPlayerNumber ); + if( row.GetFirstItemGoesDown() ) + iChoice--; + // not the "goes down" item + if( iChoice != -1 ) + { + const OptionRowHandler *pHand = row.GetHandler(); + if( pHand != NULL ) + { + CString sThisScreen = pHand->GetScreen( iChoice ); + if( sThisScreen != "" ) + m_sNextScreen = sThisScreen; + } + } + } + + // If options set a NextScreen or one is specified in metrics, then fade out + if( GetNextScreen() != "" ) + this->PostScreenMessage( SM_BeginFadingOut, 0 ); +} + /* Left/right */ void ScreenOptions::ChangeValueInRowAbsolute( int iRow, PlayerNumber pn, int iChoiceIndex, bool bRepeat ) { diff --git a/stepmania/src/ScreenOptions.h b/stepmania/src/ScreenOptions.h index 11948de66a..d12d36c69c 100644 --- a/stepmania/src/ScreenOptions.h +++ b/stepmania/src/ScreenOptions.h @@ -62,7 +62,7 @@ protected: void UpdateEnabledDisabled( int iRow ); void StoreFocus( PlayerNumber pn ); - virtual void BeginFadingOut() { this->PostScreenMessage( SM_BeginFadingOut, 0 ); } + void BeginFadingOut(); void ChangeValueInRowRelative( int iRow, PlayerNumber pn, int iDelta, bool bRepeat ); void ChangeValueInRowAbsolute( int iRow, PlayerNumber pn, int iChoiceIndex, bool bRepeat ); diff --git a/stepmania/src/ScreenOptionsMaster.cpp b/stepmania/src/ScreenOptionsMaster.cpp index 66b76226b8..5a0d91a4e7 100644 --- a/stepmania/src/ScreenOptionsMaster.cpp +++ b/stepmania/src/ScreenOptionsMaster.cpp @@ -102,36 +102,6 @@ void ScreenOptionsMaster::ExportOptions( int r, const vector &vpns m_iChangeMask |= row.ExportOptions( vpns, bRowHasFocus ); } -void ScreenOptionsMaster::BeginFadingOut() -{ - /* If the selection is on a LIST, and the selected LIST option sets the screen, - * honor it. */ - int iCurRow = this->GetCurrentRow(); - ASSERT( iCurRow >= 0 && iCurRow < (int)m_pRows.size() ); - const OptionRow &row = *m_pRows[iCurRow]; - - { - int iChoice = row.GetChoiceInRowWithFocus( GAMESTATE->m_MasterPlayerNumber ); - if( row.GetFirstItemGoesDown() ) - iChoice--; - // not the "goes down" item - if( iChoice != -1 ) - { - const OptionRowHandler *pHand = row.GetHandler(); - if( pHand != NULL ) - { - CString sThisScreen = pHand->GetScreen( iChoice ); - if( sThisScreen != "" ) - m_sNextScreen = sThisScreen; - } - } - } - - // If options set a NextScreen or one is specified in metrics, then fade out - if( GetNextScreen() != "" ) - ScreenOptions::BeginFadingOut(); -} - void ScreenOptionsMaster::HandleScreenMessage( const ScreenMessage SM ) { if( SM == SM_ExportOptions ) diff --git a/stepmania/src/ScreenOptionsMaster.h b/stepmania/src/ScreenOptionsMaster.h index d514798ecb..b88fa1532f 100644 --- a/stepmania/src/ScreenOptionsMaster.h +++ b/stepmania/src/ScreenOptionsMaster.h @@ -21,8 +21,6 @@ protected: virtual void ImportOptions( int iRow, const vector &vpns ); virtual void ExportOptions( int iRow, const vector &vpns ); - - virtual void BeginFadingOut(); }; #endif