simplify inheritance
This commit is contained in:
@@ -327,11 +327,6 @@ ScreenGameplay::ScreenGameplay()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ScreenGameplay::Init()
|
void ScreenGameplay::Init()
|
||||||
{
|
|
||||||
Init( true );
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScreenGameplay::Init( bool bUseSongBackgroundAndForeground )
|
|
||||||
{
|
{
|
||||||
PLAYER_TYPE.Load( m_sName, "PlayerType" );
|
PLAYER_TYPE.Load( m_sName, "PlayerType" );
|
||||||
GIVE_UP_START_TEXT.Load( m_sName, "GiveUpStartText" );
|
GIVE_UP_START_TEXT.Load( m_sName, "GiveUpStartText" );
|
||||||
@@ -345,7 +340,7 @@ void ScreenGameplay::Init( bool bUseSongBackgroundAndForeground )
|
|||||||
FAIL_AFTER_30_MISSES.Load( m_sName, "FailAfter30Misses" );
|
FAIL_AFTER_30_MISSES.Load( m_sName, "FailAfter30Misses" );
|
||||||
ALLOW_CENTER_1_PLAYER.Load( m_sName, "AllowCenter1Player" );
|
ALLOW_CENTER_1_PLAYER.Load( m_sName, "AllowCenter1Player" );
|
||||||
|
|
||||||
if( bUseSongBackgroundAndForeground )
|
if( UseSongBackgroundAndForeground() )
|
||||||
{
|
{
|
||||||
m_pSongBackground = new Background;
|
m_pSongBackground = new Background;
|
||||||
m_pSongForeground = new Foreground;
|
m_pSongForeground = new Foreground;
|
||||||
|
|||||||
@@ -99,7 +99,6 @@ class ScreenGameplay : public ScreenWithMenuElements
|
|||||||
public:
|
public:
|
||||||
ScreenGameplay();
|
ScreenGameplay();
|
||||||
virtual void Init();
|
virtual void Init();
|
||||||
void Init( bool bUseSongBackgroundAndForeground );
|
|
||||||
virtual ~ScreenGameplay();
|
virtual ~ScreenGameplay();
|
||||||
virtual void BeginScreen();
|
virtual void BeginScreen();
|
||||||
|
|
||||||
@@ -122,6 +121,8 @@ protected:
|
|||||||
virtual bool GenericTweenOn() const { return true; }
|
virtual bool GenericTweenOn() const { return true; }
|
||||||
virtual bool GenericTweenOff() const { return true; }
|
virtual bool GenericTweenOff() const { return true; }
|
||||||
|
|
||||||
|
virtual bool UseSongBackgroundAndForeground() const { return true; }
|
||||||
|
|
||||||
ThemeMetric<RString> PLAYER_TYPE;
|
ThemeMetric<RString> PLAYER_TYPE;
|
||||||
LocalizedString GIVE_UP_START_TEXT;
|
LocalizedString GIVE_UP_START_TEXT;
|
||||||
LocalizedString GIVE_UP_BACK_TEXT;
|
LocalizedString GIVE_UP_BACK_TEXT;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ void ScreenGameplaySyncMachine::Init()
|
|||||||
|
|
||||||
PREFSMAN->m_AutoPlay.Set( PC_HUMAN );
|
PREFSMAN->m_AutoPlay.Set( PC_HUMAN );
|
||||||
|
|
||||||
ScreenGameplayNormal::Init( false );
|
ScreenGameplayNormal::Init();
|
||||||
|
|
||||||
SO_GROUP_ASSIGN( GAMESTATE->m_SongOptions, ModsLevel_Stage, m_AutosyncType, SongOptions::AUTOSYNC_MACHINE );
|
SO_GROUP_ASSIGN( GAMESTATE->m_SongOptions, ModsLevel_Stage, m_AutosyncType, SongOptions::AUTOSYNC_MACHINE );
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ public:
|
|||||||
void HandleScreenMessage( const ScreenMessage SM );
|
void HandleScreenMessage( const ScreenMessage SM );
|
||||||
void ResetAndRestartCurrentSong();
|
void ResetAndRestartCurrentSong();
|
||||||
protected:
|
protected:
|
||||||
|
virtual bool UseSongBackgroundAndForeground() const { return false; }
|
||||||
void RefreshText();
|
void RefreshText();
|
||||||
|
|
||||||
Song m_Song;
|
Song m_Song;
|
||||||
|
|||||||
Reference in New Issue
Block a user