don't calculate NextScreen until options have been exported
This commit is contained in:
@@ -122,7 +122,7 @@ void ScreenOptionsMaster::BeginFadingOut()
|
|||||||
{
|
{
|
||||||
/* If the selection is on a LIST, and the selected LIST option sets the screen,
|
/* If the selection is on a LIST, and the selected LIST option sets the screen,
|
||||||
* honor it. */
|
* honor it. */
|
||||||
m_sNextScreen = "";
|
m_sExportedNextScreen = "";
|
||||||
|
|
||||||
int iCurRow = this->GetCurrentRow();
|
int iCurRow = this->GetCurrentRow();
|
||||||
ASSERT( iCurRow >= 0 && iCurRow < (int)m_Rows.size() );
|
ASSERT( iCurRow >= 0 && iCurRow < (int)m_Rows.size() );
|
||||||
@@ -134,14 +134,11 @@ void ScreenOptionsMaster::BeginFadingOut()
|
|||||||
OptionRowHandler *pHand = OptionRowHandlers[iCurRow];
|
OptionRowHandler *pHand = OptionRowHandlers[iCurRow];
|
||||||
CString sScreen = pHand->GetAndEraseScreen( iChoice );
|
CString sScreen = pHand->GetAndEraseScreen( iChoice );
|
||||||
if( !sScreen.empty() )
|
if( !sScreen.empty() )
|
||||||
m_sNextScreen = sScreen;
|
m_sExportedNextScreen = sScreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
// NEXT_SCREEN;
|
// If options set a NextScreen or one is specified in metrics, then fade out
|
||||||
if( m_sNextScreen == "" )
|
if( m_sExportedNextScreen != "" || NEXT_SCREEN != "" )
|
||||||
m_sNextScreen = NEXT_SCREEN;
|
|
||||||
|
|
||||||
if( !m_sNextScreen.empty() )
|
|
||||||
ScreenOptions::BeginFadingOut();
|
ScreenOptions::BeginFadingOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,8 +146,10 @@ void ScreenOptionsMaster::GoToNextScreen()
|
|||||||
{
|
{
|
||||||
if( GAMESTATE->m_bEditing )
|
if( GAMESTATE->m_bEditing )
|
||||||
SCREENMAN->PopTopScreen();
|
SCREENMAN->PopTopScreen();
|
||||||
else if( m_sNextScreen != "" )
|
else if( m_sExportedNextScreen != "" )
|
||||||
SCREENMAN->SetNewScreen( m_sNextScreen );
|
SCREENMAN->SetNewScreen( m_sExportedNextScreen );
|
||||||
|
else if( NEXT_SCREEN != "" )
|
||||||
|
SCREENMAN->SetNewScreen( NEXT_SCREEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenOptionsMaster::GoToPrevScreen()
|
void ScreenOptionsMaster::GoToPrevScreen()
|
||||||
@@ -247,7 +246,7 @@ void ScreenOptionsMaster::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
if( m_iChangeMask & OPT_RESET_GAME )
|
if( m_iChangeMask & OPT_RESET_GAME )
|
||||||
{
|
{
|
||||||
ResetGame();
|
ResetGame();
|
||||||
m_sNextScreen = "";
|
m_sExportedNextScreen = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_iChangeMask & OPT_APPLY_SOUND )
|
if( m_iChangeMask & OPT_APPLY_SOUND )
|
||||||
@@ -259,7 +258,8 @@ void ScreenOptionsMaster::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
SONGMAN->SetPreferences();
|
SONGMAN->SetPreferences();
|
||||||
|
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
this->GoToNextScreen();
|
if( !(m_iChangeMask & OPT_RESET_GAME) )
|
||||||
|
this->GoToNextScreen();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_iChangeMask;
|
int m_iChangeMask;
|
||||||
CString m_sNextScreen;
|
CString m_sExportedNextScreen; // from an OptionRowHandler
|
||||||
|
|
||||||
vector<OptionRowHandler*> OptionRowHandlers;
|
vector<OptionRowHandler*> OptionRowHandlers;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user