DebugMenu: ReloadScreen load the current screen, not the initial screen

This commit is contained in:
Chris Danford
2005-05-24 23:32:39 +00:00
parent db7909f336
commit 47681f4684
5 changed files with 8 additions and 8 deletions
+2 -1
View File
@@ -405,7 +405,8 @@ bool ScreenDebugOverlay::OverlayInput( const DeviceInput& DeviceI, const InputEv
break; break;
case DebugLine_ReloadCurrentScreen: case DebugLine_ReloadCurrentScreen:
SOUND->StopMusic(); SOUND->StopMusic();
ResetGame( true ); ResetGame();
SCREENMAN->SetNewScreen( SCREENMAN->GetTopScreen()->m_sName );
break; break;
case DebugLine_ReloadTheme: case DebugLine_ReloadTheme:
THEME->ReloadMetrics(); THEME->ReloadMetrics();
+2
View File
@@ -15,6 +15,7 @@
#include "Foreach.h" #include "Foreach.h"
#include "OptionRowHandler.h" #include "OptionRowHandler.h"
#include "ScreenOptionsMasterPrefs.h" #include "ScreenOptionsMasterPrefs.h"
#include "CommonMetrics.h"
#define LINE_NAMES THEME->GetMetric (m_sName,"LineNames") #define LINE_NAMES THEME->GetMetric (m_sName,"LineNames")
#define OPTION_MENU_FLAGS THEME->GetMetric (m_sName,"OptionMenuFlags") #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 ) if( m_iChangeMask & OPT_RESET_GAME )
{ {
ResetGame(); ResetGame();
SCREENMAN->SetNewScreen( INITIAL_SCREEN );
m_bExportWillSetANewScreen = false; m_bExportWillSetANewScreen = false;
} }
+1 -1
View File
@@ -158,7 +158,7 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty
GAMESTATE->m_pCurGame = *iter; GAMESTATE->m_pCurGame = *iter;
/* Reload the theme if it's changed, but don't back to the initial screen. */ /* 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->SystemMessage( CString("Game: ") + GAMESTATE->GetCurrentGame()->m_szName );
SCREENMAN->SetNewScreen( m_sName ); SCREENMAN->SetNewScreen( m_sName );
+2 -5
View File
@@ -275,7 +275,7 @@ void ExitGame()
g_bQuitting = true; g_bQuitting = true;
} }
void ResetGame( bool ReturnToFirstScreen ) void ResetGame()
{ {
GAMESTATE->Reset(); GAMESTATE->Reset();
@@ -312,10 +312,6 @@ void ResetGame( bool ReturnToFirstScreen )
PREFSMAN->m_sLastSeenInputDevices.Set( sInputDevices ); PREFSMAN->m_sLastSeenInputDevices.Set( sInputDevices );
} }
if( ReturnToFirstScreen )
SCREENMAN->SetNewScreen( INITIAL_SCREEN );
} }
static void GameLoop(); static void GameLoop();
@@ -1153,6 +1149,7 @@ int main(int argc, char* argv[])
HOOKS->BoostPriority(); HOOKS->BoostPriority();
ResetGame(); ResetGame();
SCREENMAN->SetNewScreen( INITIAL_SCREEN );
CodeDetector::RefreshCacheItems(); CodeDetector::RefreshCacheItems();
+1 -1
View File
@@ -11,7 +11,7 @@ int main( int argc, char* argv[] );
void ApplyGraphicOptions(); void ApplyGraphicOptions();
void NORETURN HandleException( CString error ); void NORETURN HandleException( CString error );
void ExitGame(); void ExitGame();
void ResetGame( bool ReturnToFirstScreen=true ); void ResetGame();
void SaveGamePrefsToDisk(); void SaveGamePrefsToDisk();
void ChangeCurrentGame( const Game* g ); void ChangeCurrentGame( const Game* g );
void FocusChanged( bool bHasFocus ); void FocusChanged( bool bHasFocus );