DebugMenu: ReloadScreen load the current screen, not the initial screen
This commit is contained in:
@@ -405,7 +405,8 @@ bool ScreenDebugOverlay::OverlayInput( const DeviceInput& DeviceI, const InputEv
|
||||
break;
|
||||
case DebugLine_ReloadCurrentScreen:
|
||||
SOUND->StopMusic();
|
||||
ResetGame( true );
|
||||
ResetGame();
|
||||
SCREENMAN->SetNewScreen( SCREENMAN->GetTopScreen()->m_sName );
|
||||
break;
|
||||
case DebugLine_ReloadTheme:
|
||||
THEME->ReloadMetrics();
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "Foreach.h"
|
||||
#include "OptionRowHandler.h"
|
||||
#include "ScreenOptionsMasterPrefs.h"
|
||||
#include "CommonMetrics.h"
|
||||
|
||||
#define LINE_NAMES THEME->GetMetric (m_sName,"LineNames")
|
||||
#define OPTION_MENU_FLAGS THEME->GetMetric (m_sName,"OptionMenuFlags")
|
||||
@@ -260,6 +261,7 @@ void ScreenOptionsMaster::HandleScreenMessage( const ScreenMessage SM )
|
||||
if( m_iChangeMask & OPT_RESET_GAME )
|
||||
{
|
||||
ResetGame();
|
||||
SCREENMAN->SetNewScreen( INITIAL_SCREEN );
|
||||
m_bExportWillSetANewScreen = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty
|
||||
GAMESTATE->m_pCurGame = *iter;
|
||||
|
||||
/* Reload the theme if it's changed, but don't back to the initial screen. */
|
||||
ResetGame( false );
|
||||
ResetGame();
|
||||
|
||||
SCREENMAN->SystemMessage( CString("Game: ") + GAMESTATE->GetCurrentGame()->m_szName );
|
||||
SCREENMAN->SetNewScreen( m_sName );
|
||||
|
||||
@@ -275,7 +275,7 @@ void ExitGame()
|
||||
g_bQuitting = true;
|
||||
}
|
||||
|
||||
void ResetGame( bool ReturnToFirstScreen )
|
||||
void ResetGame()
|
||||
{
|
||||
GAMESTATE->Reset();
|
||||
|
||||
@@ -312,10 +312,6 @@ void ResetGame( bool ReturnToFirstScreen )
|
||||
|
||||
PREFSMAN->m_sLastSeenInputDevices.Set( sInputDevices );
|
||||
}
|
||||
|
||||
|
||||
if( ReturnToFirstScreen )
|
||||
SCREENMAN->SetNewScreen( INITIAL_SCREEN );
|
||||
}
|
||||
|
||||
static void GameLoop();
|
||||
@@ -1153,6 +1149,7 @@ int main(int argc, char* argv[])
|
||||
HOOKS->BoostPriority();
|
||||
|
||||
ResetGame();
|
||||
SCREENMAN->SetNewScreen( INITIAL_SCREEN );
|
||||
|
||||
CodeDetector::RefreshCacheItems();
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ int main( int argc, char* argv[] );
|
||||
void ApplyGraphicOptions();
|
||||
void NORETURN HandleException( CString error );
|
||||
void ExitGame();
|
||||
void ResetGame( bool ReturnToFirstScreen=true );
|
||||
void ResetGame();
|
||||
void SaveGamePrefsToDisk();
|
||||
void ChangeCurrentGame( const Game* g );
|
||||
void FocusChanged( bool bHasFocus );
|
||||
|
||||
Reference in New Issue
Block a user