convert this screen to Menu, to get rid of old transitions
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
_missing
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
_fade in
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
_blank.png
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
_blank.png
|
||||||
@@ -119,6 +119,7 @@ FoldOnJoin=1
|
|||||||
|
|
||||||
[ScreenStyleSplash]
|
[ScreenStyleSplash]
|
||||||
NextScreen=ScreenSelectGroup
|
NextScreen=ScreenSelectGroup
|
||||||
|
HelpText=
|
||||||
|
|
||||||
[ScreenSelectDifficulty]
|
[ScreenSelectDifficulty]
|
||||||
Choices=arcade-beginner,arcade-easy,arcade-medium,arcade-hard,nonstop,oni,endless
|
Choices=arcade-beginner,arcade-easy,arcade-medium,arcade-hard,nonstop,oni,endless
|
||||||
|
|||||||
@@ -13,9 +13,8 @@
|
|||||||
#include "ScreenStyleSplash.h"
|
#include "ScreenStyleSplash.h"
|
||||||
#include "GameConstantsAndTypes.h"
|
#include "GameConstantsAndTypes.h"
|
||||||
#include "PrefsManager.h"
|
#include "PrefsManager.h"
|
||||||
#include "AnnouncerManager.h"
|
|
||||||
#include "GameState.h"
|
|
||||||
#include "RageSoundManager.h"
|
#include "RageSoundManager.h"
|
||||||
|
#include "ScreenManager.h"
|
||||||
#include "ThemeManager.h"
|
#include "ThemeManager.h"
|
||||||
#include "GameState.h"
|
#include "GameState.h"
|
||||||
#include "GameManager.h"
|
#include "GameManager.h"
|
||||||
@@ -44,11 +43,8 @@ ScreenStyleSplash::ScreenStyleSplash()
|
|||||||
m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations",ssprintf("ScreenStyleSplash-%s-%s-%d",sGameName.GetString(),sStyleName.GetString(),iDifficulty) ) );
|
m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations",ssprintf("ScreenStyleSplash-%s-%s-%d",sGameName.GetString(),sStyleName.GetString(),iDifficulty) ) );
|
||||||
this->AddChild( &m_Background );
|
this->AddChild( &m_Background );
|
||||||
|
|
||||||
m_Wipe.OpenWipingRight( SM_DoneOpening );
|
m_Menu.Load( "ScreenStyleSplash" );
|
||||||
this->AddChild( &m_Wipe );
|
this->AddChild( &m_Menu );
|
||||||
|
|
||||||
// m_FadeWipe.SetOpened();
|
|
||||||
// this->AddChild( &m_FadeWipe );
|
|
||||||
|
|
||||||
this->SendScreenMessage( SM_StartClosing, 2 );
|
this->SendScreenMessage( SM_StartClosing, 2 );
|
||||||
}
|
}
|
||||||
@@ -56,7 +52,7 @@ ScreenStyleSplash::ScreenStyleSplash()
|
|||||||
|
|
||||||
void ScreenStyleSplash::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
void ScreenStyleSplash::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
||||||
{
|
{
|
||||||
if( m_Wipe.IsClosing() )
|
if( m_Menu.IsTransitioning() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Screen::Input( DeviceI, type, GameI, MenuI, StyleI );
|
Screen::Input( DeviceI, type, GameI, MenuI, StyleI );
|
||||||
@@ -68,8 +64,8 @@ void ScreenStyleSplash::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
switch( SM )
|
switch( SM )
|
||||||
{
|
{
|
||||||
case SM_StartClosing:
|
case SM_StartClosing:
|
||||||
if( !m_Wipe.IsClosing() )
|
if( !m_Menu.IsTransitioning() )
|
||||||
m_Wipe.CloseWipingRight( SM_GoToNextScreen );
|
m_Menu.StartTransitioning( SM_GoToNextScreen );
|
||||||
break;
|
break;
|
||||||
case SM_DoneOpening:
|
case SM_DoneOpening:
|
||||||
|
|
||||||
@@ -85,15 +81,22 @@ void ScreenStyleSplash::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
|
|
||||||
void ScreenStyleSplash::MenuStart( PlayerNumber pn )
|
void ScreenStyleSplash::MenuStart( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
m_Wipe.CloseWipingRight( SM_GoToNextScreen );
|
m_Menu.StartTransitioning( SM_GoToNextScreen );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenStyleSplash::MenuBack( PlayerNumber pn )
|
void ScreenStyleSplash::MenuBack( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
if(m_FadeWipe.IsClosing())
|
if(m_Menu.IsTransitioning())
|
||||||
return;
|
return;
|
||||||
this->ClearMessageQueue();
|
this->ClearMessageQueue();
|
||||||
m_FadeWipe.CloseWipingLeft( SM_GoToPrevScreen );
|
m_Menu.Back( SM_GoToPrevScreen );
|
||||||
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu back") );
|
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu back") );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScreenStyleSplash::DrawPrimitives()
|
||||||
|
{
|
||||||
|
m_Menu.DrawBottomLayer();
|
||||||
|
Screen::DrawPrimitives();
|
||||||
|
m_Menu.DrawTopLayer();
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,10 +14,8 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "Screen.h"
|
#include "Screen.h"
|
||||||
#include "TransitionFade.h"
|
|
||||||
#include "TransitionFadeWipe.h"
|
|
||||||
#include "RandomSample.h"
|
|
||||||
#include "BGAnimation.h"
|
#include "BGAnimation.h"
|
||||||
|
#include "MenuElements.h"
|
||||||
|
|
||||||
|
|
||||||
class ScreenStyleSplash : public Screen
|
class ScreenStyleSplash : public Screen
|
||||||
@@ -27,13 +25,14 @@ public:
|
|||||||
|
|
||||||
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
||||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||||
|
virtual void DrawPrimitives();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void MenuStart( PlayerNumber pn );
|
void MenuStart( PlayerNumber pn );
|
||||||
void MenuBack( PlayerNumber pn );
|
void MenuBack( PlayerNumber pn );
|
||||||
|
|
||||||
|
MenuElements m_Menu;
|
||||||
BGAnimation m_Background;
|
BGAnimation m_Background;
|
||||||
TransitionFade m_Wipe;
|
|
||||||
TransitionFadeWipe m_FadeWipe;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user