allow running a command before initting gameplay

This commit is contained in:
Glenn Maynard
2005-07-04 23:38:07 +00:00
parent 744329f9e9
commit 6cca66a1ab
+5
View File
@@ -62,6 +62,7 @@
#define SONG_POSITION_METER_WIDTH THEME->GetMetricF(m_sName,"SongPositionMeterWidth")
#define PLAYER_X( p, styleType ) THEME->GetMetricF(m_sName,ssprintf("PlayerP%d%sX",p+1,StyleTypeToString(styleType).c_str()))
#define STOP_COURSE_EARLY THEME->GetMetricB(m_sName,"StopCourseEarly") // evaluate this every time it's used
#define PRE_INIT_COMMAND THEME->GetMetricA(m_sName,"ScreenPreInitCommand")
static ThemeMetric<float> INITIAL_BACKGROUND_BRIGHTNESS ("ScreenGameplay","InitialBackgroundBrightness");
static ThemeMetric<float> SECONDS_BETWEEN_COMMENTS ("ScreenGameplay","SecondsBetweenComments");
@@ -103,6 +104,10 @@ ScreenGameplay::ScreenGameplay( CString sName ) : ScreenWithMenuElements(sName)
void ScreenGameplay::Init()
{
// Experimental: run a pre-command on the screen itself, to allow setting up
// state before initializing actors.
this->RunCommands( PRE_INIT_COMMAND );
ScreenWithMenuElements::Init();
/* Pause MEMCARDMAN. If a memory card is remove, we don't want to interrupt the