Add metric ResetGameState, this can be extremely useful in some places.

This commit is contained in:
Colby Klein
2008-09-24 16:46:34 +00:00
parent 9e8a3048d8
commit 46130b0d3f
3 changed files with 6 additions and 1 deletions
+1
View File
@@ -2088,6 +2088,7 @@ Fallback="StepsDisplayGameplay"
[ScreenWithMenuElements] [ScreenWithMenuElements]
Fallback="Screen" Fallback="Screen"
AllowDisabledPlayerInput=false AllowDisabledPlayerInput=false
ResetGameState=false
ShowStyleIcon=true ShowStyleIcon=true
ShowStageDisplay=false ShowStageDisplay=false
StageDisplayX=SCREEN_CENTER_X+234 StageDisplayX=SCREEN_CENTER_X+234
+4 -1
View File
@@ -33,11 +33,14 @@ void ScreenWithMenuElements::Init()
CANCEL_TRANSITIONS_OUT.Load( m_sName, "CancelTransitionsOut" ); CANCEL_TRANSITIONS_OUT.Load( m_sName, "CancelTransitionsOut" );
TIMER_SECONDS.Load( m_sName, "TimerSeconds" ); TIMER_SECONDS.Load( m_sName, "TimerSeconds" );
TIMER_METRICS_GROUP.Load( m_sName, "TimerMetricsGroup" ); TIMER_METRICS_GROUP.Load( m_sName, "TimerMetricsGroup" );
RESET_GAMESTATE.Load( m_sName, "ResetGameState" );
Screen::Init(); Screen::Init();
ASSERT( this->m_SubActors.empty() ); // don't call Init twice! ASSERT( this->m_SubActors.empty() ); // don't call Init twice!
if( RESET_GAMESTATE )
GAMESTATE->Reset();
if( MEMORY_CARD_ICONS ) if( MEMORY_CARD_ICONS )
{ {
FOREACH_PlayerNumber( p ) FOREACH_PlayerNumber( p )
+1
View File
@@ -58,6 +58,7 @@ protected:
ThemeMetric<bool> CANCEL_TRANSITIONS_OUT; ThemeMetric<bool> CANCEL_TRANSITIONS_OUT;
ThemeMetric<float> TIMER_SECONDS; ThemeMetric<float> TIMER_SECONDS;
ThemeMetric<RString> TIMER_METRICS_GROUP; ThemeMetric<RString> TIMER_METRICS_GROUP;
ThemeMetric<bool> RESET_GAMESTATE;
private: private:
RString m_sPathToMusic; RString m_sPathToMusic;