ScreenBranch shouldn't try to load a background
This commit is contained in:
@@ -35,6 +35,7 @@ public:
|
|||||||
void ClearMessageQueue( const ScreenMessage SM ); // clear of a specific SM
|
void ClearMessageQueue( const ScreenMessage SM ); // clear of a specific SM
|
||||||
|
|
||||||
bool IsTransparent() const { return m_bIsTransparent; }
|
bool IsTransparent() const { return m_bIsTransparent; }
|
||||||
|
virtual bool UsesBackground() const { return true; } // override and set false if this screen shouldn't load a background
|
||||||
|
|
||||||
static bool ChangeCoinModeInput( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); // return true if CoinMode changed
|
static bool ChangeCoinModeInput( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); // return true if CoinMode changed
|
||||||
static bool JoinInput( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); // return true if a player joined
|
static bool JoinInput( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); // return true if a player joined
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ public:
|
|||||||
|
|
||||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||||
|
|
||||||
|
virtual bool UsesBackground() const { return false; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CString m_sChoice;
|
CString m_sChoice;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -338,20 +338,22 @@ retry:
|
|||||||
|
|
||||||
|
|
||||||
// Load shared BGAnimation
|
// Load shared BGAnimation
|
||||||
CString sNewBGA = THEME->GetPathToB(sScreenName+" background");
|
if( pNewScreen->UsesBackground() )
|
||||||
if( m_sLastLoadedBackground != sNewBGA )
|
|
||||||
{
|
{
|
||||||
// Create the new background before deleting the previous so that we keep
|
CString sNewBGA = THEME->GetPathToB(sScreenName+" background");
|
||||||
// any common textures loaded.
|
if( m_sLastLoadedBackground != sNewBGA )
|
||||||
BGAnimation *pNewBGA = new BGAnimation;
|
{
|
||||||
pNewBGA->LoadFromAniDir( sNewBGA );
|
// Create the new background before deleting the previous so that we keep
|
||||||
SAFE_DELETE( m_pSharedBGA );
|
// any common textures loaded.
|
||||||
m_pSharedBGA = pNewBGA;
|
BGAnimation *pNewBGA = new BGAnimation;
|
||||||
|
pNewBGA->LoadFromAniDir( sNewBGA );
|
||||||
|
SAFE_DELETE( m_pSharedBGA );
|
||||||
|
m_pSharedBGA = pNewBGA;
|
||||||
|
|
||||||
m_sLastLoadedBackground = sNewBGA;
|
m_sLastLoadedBackground = sNewBGA;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if( pOldTopScreen!=NULL && m_ScreenStack.back()!=pOldTopScreen )
|
if( pOldTopScreen!=NULL && m_ScreenStack.back()!=pOldTopScreen )
|
||||||
{
|
{
|
||||||
// While constructing this Screen, it's constructor called
|
// While constructing this Screen, it's constructor called
|
||||||
|
|||||||
Reference in New Issue
Block a user