Add metric ResetGameState, this can be extremely useful in some places.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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 )
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user