replace uses of TransitionFade with TransitionBGAnimation
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
_prompt in
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
_prompt out
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
_prompt in
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
_prompt out
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
_prompt in
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
_prompt out
|
||||||
@@ -272,7 +272,10 @@ ScreenEdit::ScreenEdit() : Screen("ScreenEdit")
|
|||||||
GAMESTATE->m_PlayerController[PLAYER_1] = HUMAN;
|
GAMESTATE->m_PlayerController[PLAYER_1] = HUMAN;
|
||||||
m_Player.SetXY( PLAYER_X, PLAYER_Y );
|
m_Player.SetXY( PLAYER_X, PLAYER_Y );
|
||||||
|
|
||||||
m_Fade.SetClosed();
|
m_In.Load( THEME->GetPathToB("ScreenEdit in") );
|
||||||
|
m_In.StartTransitioning();
|
||||||
|
|
||||||
|
m_Out.Load( THEME->GetPathToB("ScreenEdit out") );
|
||||||
|
|
||||||
m_sprHelp.Load( THEME->GetPathToG("ScreenEdit help") );
|
m_sprHelp.Load( THEME->GetPathToG("ScreenEdit help") );
|
||||||
m_sprHelp.SetHorizAlign( Actor::align_left );
|
m_sprHelp.SetHorizAlign( Actor::align_left );
|
||||||
@@ -284,6 +287,7 @@ ScreenEdit::ScreenEdit() : Screen("ScreenEdit")
|
|||||||
m_textHelp.SetVertAlign( Actor::align_top );
|
m_textHelp.SetVertAlign( Actor::align_top );
|
||||||
m_textHelp.SetZoom( 0.5f );
|
m_textHelp.SetZoom( 0.5f );
|
||||||
m_textHelp.SetText( HELP_TEXT );
|
m_textHelp.SetText( HELP_TEXT );
|
||||||
|
m_textHelp.EnableShadow( false );
|
||||||
|
|
||||||
m_sprInfo.Load( THEME->GetPathToG("ScreenEdit Info") );
|
m_sprInfo.Load( THEME->GetPathToG("ScreenEdit Info") );
|
||||||
m_sprInfo.SetHorizAlign( Actor::align_right );
|
m_sprInfo.SetHorizAlign( Actor::align_right );
|
||||||
@@ -294,6 +298,7 @@ ScreenEdit::ScreenEdit() : Screen("ScreenEdit")
|
|||||||
m_textInfo.SetHorizAlign( Actor::align_left );
|
m_textInfo.SetHorizAlign( Actor::align_left );
|
||||||
m_textInfo.SetVertAlign( Actor::align_top );
|
m_textInfo.SetVertAlign( Actor::align_top );
|
||||||
m_textInfo.SetZoom( 0.5f );
|
m_textInfo.SetZoom( 0.5f );
|
||||||
|
m_textInfo.EnableShadow( false );
|
||||||
//m_textInfo.SetText(); // set this below every frame
|
//m_textInfo.SetText(); // set this below every frame
|
||||||
|
|
||||||
m_soundChangeLine.Load( THEME->GetPathToS("ScreenEdit line") );
|
m_soundChangeLine.Load( THEME->GetPathToS("ScreenEdit line") );
|
||||||
@@ -306,8 +311,6 @@ ScreenEdit::ScreenEdit() : Screen("ScreenEdit")
|
|||||||
m_soundMusic.SetStopMode(RageSound::M_CONTINUE);
|
m_soundMusic.SetStopMode(RageSound::M_CONTINUE);
|
||||||
|
|
||||||
m_soundAssistTick.Load( THEME->GetPathToS("ScreenEdit assist tick") );
|
m_soundAssistTick.Load( THEME->GetPathToS("ScreenEdit assist tick") );
|
||||||
|
|
||||||
m_Fade.OpenWipingRight();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScreenEdit::~ScreenEdit()
|
ScreenEdit::~ScreenEdit()
|
||||||
@@ -410,7 +413,8 @@ void ScreenEdit::Update( float fDeltaTime )
|
|||||||
m_SnapDisplay.Update( fDeltaTime );
|
m_SnapDisplay.Update( fDeltaTime );
|
||||||
m_GrayArrowRowEdit.Update( fDeltaTime );
|
m_GrayArrowRowEdit.Update( fDeltaTime );
|
||||||
m_NoteFieldEdit.Update( fDeltaTime );
|
m_NoteFieldEdit.Update( fDeltaTime );
|
||||||
m_Fade.Update( fDeltaTime );
|
m_In.Update( fDeltaTime );
|
||||||
|
m_Out.Update( fDeltaTime );
|
||||||
m_sprHelp.Update( fDeltaTime );
|
m_sprHelp.Update( fDeltaTime );
|
||||||
m_textHelp.Update( fDeltaTime );
|
m_textHelp.Update( fDeltaTime );
|
||||||
m_sprInfo.Update( fDeltaTime );
|
m_sprInfo.Update( fDeltaTime );
|
||||||
@@ -522,7 +526,8 @@ void ScreenEdit::DrawPrimitives()
|
|||||||
m_textHelp.Draw();
|
m_textHelp.Draw();
|
||||||
m_sprInfo.Draw();
|
m_sprInfo.Draw();
|
||||||
m_textInfo.Draw();
|
m_textInfo.Draw();
|
||||||
m_Fade.Draw();
|
m_In.Draw();
|
||||||
|
m_Out.Draw();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MODE_RECORDING:
|
case MODE_RECORDING:
|
||||||
@@ -545,6 +550,9 @@ void ScreenEdit::Input( const DeviceInput& DeviceI, const InputEventType type, c
|
|||||||
{
|
{
|
||||||
// LOG->Trace( "ScreenEdit::Input()" );
|
// LOG->Trace( "ScreenEdit::Input()" );
|
||||||
|
|
||||||
|
if( m_In.IsTransitioning() || m_Out.IsTransitioning() )
|
||||||
|
return;
|
||||||
|
|
||||||
switch( m_EditMode )
|
switch( m_EditMode )
|
||||||
{
|
{
|
||||||
case MODE_EDITING: InputEdit( DeviceI, type, GameI, MenuI, StyleI ); break;
|
case MODE_EDITING: InputEdit( DeviceI, type, GameI, MenuI, StyleI ); break;
|
||||||
@@ -1283,7 +1291,7 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, int* iAnswers )
|
|||||||
PlayPreviewMusic();
|
PlayPreviewMusic();
|
||||||
break;
|
break;
|
||||||
case exit:
|
case exit:
|
||||||
SCREENMAN->SetNewScreen( "ScreenEditMenu" );
|
m_Out.StartTransitioning( SM_GoToNextScreen );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "Screen.h"
|
#include "Screen.h"
|
||||||
#include "Sprite.h"
|
#include "Sprite.h"
|
||||||
#include "TransitionFade.h"
|
#include "TransitionBGAnimation.h"
|
||||||
#include "BitmapText.h"
|
#include "BitmapText.h"
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "RandomSample.h"
|
#include "RandomSample.h"
|
||||||
@@ -79,7 +79,8 @@ protected:
|
|||||||
RageSound m_soundChangeSnap;
|
RageSound m_soundChangeSnap;
|
||||||
RageSound m_soundMarker;
|
RageSound m_soundMarker;
|
||||||
|
|
||||||
TransitionFade m_Fade;
|
TransitionBGAnimation m_In;
|
||||||
|
TransitionBGAnimation m_Out;
|
||||||
|
|
||||||
|
|
||||||
// for MODE_RECORD
|
// for MODE_RECORD
|
||||||
|
|||||||
@@ -32,13 +32,16 @@ ScreenGameOver::ScreenGameOver() : Screen("ScreenGameOver")
|
|||||||
m_Background.LoadFromAniDir( THEME->GetPathToB("ScreenGameOver background") );
|
m_Background.LoadFromAniDir( THEME->GetPathToB("ScreenGameOver background") );
|
||||||
this->AddChild( &m_Background );
|
this->AddChild( &m_Background );
|
||||||
|
|
||||||
m_Fade.OpenWipingRight( SM_None );
|
m_In.Load( THEME->GetPathToB("ScreenGameOver in") );
|
||||||
this->AddChild( &m_Fade );
|
this->AddChild( &m_In );
|
||||||
|
|
||||||
|
m_Out.Load( THEME->GetPathToB("ScreenGameOver out") );
|
||||||
|
this->AddChild( &m_Out );
|
||||||
|
|
||||||
SOUNDMAN->PlayMusic( THEME->GetPathToS("ScreenGameOver music") );
|
SOUNDMAN->PlayMusic( THEME->GetPathToS("ScreenGameOver music") );
|
||||||
|
|
||||||
this->PostScreenMessage( SM_PlayAnnouncer, 0.5 );
|
m_In.StartTransitioning( SM_PlayAnnouncer );
|
||||||
this->PostScreenMessage( SM_StartFadingOut, 5 );
|
this->PostScreenMessage( SM_StartFadingOut, m_Background.GetLengthSeconds() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -50,7 +53,7 @@ void ScreenGameOver::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("game over") );
|
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("game over") );
|
||||||
break;
|
break;
|
||||||
case SM_StartFadingOut:
|
case SM_StartFadingOut:
|
||||||
m_Fade.CloseWipingRight( SM_GoToNextScreen );
|
m_Out.StartTransitioning( SM_GoToNextScreen );
|
||||||
break;
|
break;
|
||||||
case SM_GoToNextScreen:
|
case SM_GoToNextScreen:
|
||||||
SCREENMAN->SetNewScreen( NEXT_SCREEN );
|
SCREENMAN->SetNewScreen( NEXT_SCREEN );
|
||||||
@@ -60,7 +63,7 @@ void ScreenGameOver::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
|
|
||||||
void ScreenGameOver::MenuStart( PlayerNumber pn )
|
void ScreenGameOver::MenuStart( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
if( m_Fade.IsClosing() )
|
if( m_In.IsTransitioning() || m_Out.IsTransitioning() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this->ClearMessageQueue();
|
this->ClearMessageQueue();
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "Screen.h"
|
#include "Screen.h"
|
||||||
#include "BGAnimation.h"
|
#include "BGAnimation.h"
|
||||||
#include "TransitionFade.h"
|
#include "TransitionBGAnimation.h"
|
||||||
|
|
||||||
|
|
||||||
class ScreenGameOver : public Screen
|
class ScreenGameOver : public Screen
|
||||||
@@ -25,8 +25,9 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
TransitionFade m_Fade;
|
TransitionBGAnimation m_In;
|
||||||
BGAnimation m_Background;
|
TransitionBGAnimation m_Out;
|
||||||
|
BGAnimation m_Background;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -49,11 +49,8 @@ ScreenMiniMenu::ScreenMiniMenu( Menu* pDef, ScreenMessage SM_SendOnOK, ScreenMes
|
|||||||
ASSERT( m_Def.rows.size() <= MAX_MENU_ROWS );
|
ASSERT( m_Def.rows.size() <= MAX_MENU_ROWS );
|
||||||
|
|
||||||
|
|
||||||
m_Fade.SetTransitionTime( 0.5f );
|
m_Background.LoadFromAniDir( THEME->GetPathToB("ScreenMiniMenu background") );
|
||||||
m_Fade.SetDiffuse( RageColor(0,0,0,0.7f) );
|
this->AddChild( &m_Background );
|
||||||
m_Fade.SetOpened();
|
|
||||||
m_Fade.CloseWipingRight();
|
|
||||||
this->AddChild( &m_Fade );
|
|
||||||
|
|
||||||
|
|
||||||
float fHeightOfAll = (m_Def.rows.size()-1)*SPACING_Y;
|
float fHeightOfAll = (m_Def.rows.size()-1)*SPACING_Y;
|
||||||
@@ -125,7 +122,12 @@ ScreenMiniMenu::ScreenMiniMenu( Menu* pDef, ScreenMessage SM_SendOnOK, ScreenMes
|
|||||||
m_textAnswer[k].SetX( fAnswerX );
|
m_textAnswer[k].SetX( fAnswerX );
|
||||||
}
|
}
|
||||||
|
|
||||||
SOUNDMAN->PlayOnce( THEME->GetPathToS("Common prompt") );
|
m_In.Load( THEME->GetPathToB("ScreenMiniMenu in") );
|
||||||
|
m_In.StartTransitioning();
|
||||||
|
this->AddChild( &m_In );
|
||||||
|
|
||||||
|
m_Out.Load( THEME->GetPathToB("ScreenMiniMenu out") );
|
||||||
|
this->AddChild( &m_Out );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenMiniMenu::Update( float fDeltaTime )
|
void ScreenMiniMenu::Update( float fDeltaTime )
|
||||||
@@ -140,7 +142,7 @@ void ScreenMiniMenu::DrawPrimitives()
|
|||||||
|
|
||||||
void ScreenMiniMenu::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
void ScreenMiniMenu::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
||||||
{
|
{
|
||||||
if( m_Fade.IsOpening() )
|
if( m_In.IsTransitioning() || m_Out.IsTransitioning() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( DeviceI.device==DEVICE_KEYBOARD && type==IET_FIRST_PRESS )
|
if( DeviceI.device==DEVICE_KEYBOARD && type==IET_FIRST_PRESS )
|
||||||
@@ -212,7 +214,7 @@ void ScreenMiniMenu::MenuRight( PlayerNumber pn )
|
|||||||
|
|
||||||
void ScreenMiniMenu::MenuStart( PlayerNumber pn )
|
void ScreenMiniMenu::MenuStart( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
m_Fade.OpenWipingRight( SM_GoToOK );
|
m_Out.StartTransitioning( SM_GoToOK );
|
||||||
|
|
||||||
SOUNDMAN->PlayOnce( THEME->GetPathToS("Common start") );
|
SOUNDMAN->PlayOnce( THEME->GetPathToS("Common start") );
|
||||||
|
|
||||||
@@ -222,7 +224,7 @@ void ScreenMiniMenu::MenuStart( PlayerNumber pn )
|
|||||||
|
|
||||||
void ScreenMiniMenu::MenuBack( PlayerNumber pn )
|
void ScreenMiniMenu::MenuBack( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
m_Fade.OpenWipingRight( SM_GoToCancel );
|
m_Out.StartTransitioning( SM_GoToCancel );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenMiniMenu::BeforeLineChanged()
|
void ScreenMiniMenu::BeforeLineChanged()
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include "Screen.h"
|
#include "Screen.h"
|
||||||
#include "BitmapText.h"
|
#include "BitmapText.h"
|
||||||
#include "TransitionFade.h"
|
#include "TransitionBGAnimation.h"
|
||||||
#include "Quad.h"
|
#include "Quad.h"
|
||||||
#include "RandomSample.h"
|
#include "RandomSample.h"
|
||||||
|
|
||||||
@@ -92,14 +92,16 @@ protected:
|
|||||||
void AfterLineChanged();
|
void AfterLineChanged();
|
||||||
void AfterAnswerChanged();
|
void AfterAnswerChanged();
|
||||||
|
|
||||||
|
BGAnimation m_Background;
|
||||||
Menu m_Def;
|
Menu m_Def;
|
||||||
TransitionFade m_Fade;
|
|
||||||
BitmapText m_textTitle;
|
BitmapText m_textTitle;
|
||||||
BitmapText m_textLabel[MAX_MENU_ROWS];
|
BitmapText m_textLabel[MAX_MENU_ROWS];
|
||||||
BitmapText m_textAnswer[MAX_MENU_ROWS];
|
BitmapText m_textAnswer[MAX_MENU_ROWS];
|
||||||
int m_iCurLine;
|
int m_iCurLine;
|
||||||
int m_iCurAnswers[MAX_MENU_ROWS];
|
int m_iCurAnswers[MAX_MENU_ROWS];
|
||||||
ScreenMessage m_SMSendOnOK, m_SMSendOnCancel;
|
ScreenMessage m_SMSendOnOK, m_SMSendOnCancel;
|
||||||
|
TransitionBGAnimation m_In;
|
||||||
|
TransitionBGAnimation m_Out;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static int s_iLastLine;
|
static int s_iLastLine;
|
||||||
|
|||||||
@@ -38,11 +38,8 @@ ScreenPrompt::ScreenPrompt( ScreenMessage SM_SendWhenDone, CString sText, bool b
|
|||||||
m_pOnNo = OnNo;
|
m_pOnNo = OnNo;
|
||||||
|
|
||||||
|
|
||||||
m_Fade.SetTransitionTime( 0.5f );
|
m_Background.LoadFromAniDir( THEME->GetPathToB("ScreenPrompt background") );
|
||||||
m_Fade.SetDiffuse( RageColor(0,0,0,0.7f) );
|
this->AddChild( &m_Background );
|
||||||
m_Fade.SetOpened();
|
|
||||||
m_Fade.CloseWipingRight();
|
|
||||||
this->AddChild( &m_Fade );
|
|
||||||
|
|
||||||
m_textQuestion.LoadFromFont( THEME->GetPathToF("Common normal") );
|
m_textQuestion.LoadFromFont( THEME->GetPathToF("Common normal") );
|
||||||
m_textQuestion.SetText( sText );
|
m_textQuestion.SetText( sText );
|
||||||
@@ -80,7 +77,12 @@ ScreenPrompt::ScreenPrompt( ScreenMessage SM_SendWhenDone, CString sText, bool b
|
|||||||
|
|
||||||
m_textAnswer[m_bAnswer].SetEffectGlowShift();
|
m_textAnswer[m_bAnswer].SetEffectGlowShift();
|
||||||
|
|
||||||
SOUNDMAN->PlayOnce( THEME->GetPathToS("Common prompt") );
|
m_In.Load( THEME->GetPathToB("ScreenPrompt in") );
|
||||||
|
m_In.StartTransitioning();
|
||||||
|
this->AddChild( &m_In );
|
||||||
|
|
||||||
|
m_Out.Load( THEME->GetPathToB("ScreenPrompt out") );
|
||||||
|
this->AddChild( &m_Out );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenPrompt::Update( float fDeltaTime )
|
void ScreenPrompt::Update( float fDeltaTime )
|
||||||
@@ -95,7 +97,7 @@ void ScreenPrompt::DrawPrimitives()
|
|||||||
|
|
||||||
void ScreenPrompt::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
void ScreenPrompt::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
||||||
{
|
{
|
||||||
if( m_Fade.IsOpening() )
|
if( m_In.IsTransitioning() || m_Out.IsTransitioning() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( DeviceI.device==DEVICE_KEYBOARD && type==IET_FIRST_PRESS )
|
if( DeviceI.device==DEVICE_KEYBOARD && type==IET_FIRST_PRESS )
|
||||||
@@ -157,7 +159,7 @@ void ScreenPrompt::MenuRight( PlayerNumber pn )
|
|||||||
|
|
||||||
void ScreenPrompt::MenuStart( PlayerNumber pn )
|
void ScreenPrompt::MenuStart( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
m_Fade.OpenWipingRight( SM_DoneOpeningWipingRight );
|
m_Out.StartTransitioning( SM_DoneOpeningWipingRight );
|
||||||
|
|
||||||
m_textQuestion.BeginTweening( 0.2f );
|
m_textQuestion.BeginTweening( 0.2f );
|
||||||
m_textQuestion.SetDiffuse( RageColor(1,1,1,0) );
|
m_textQuestion.SetDiffuse( RageColor(1,1,1,0) );
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include "Screen.h"
|
#include "Screen.h"
|
||||||
#include "BitmapText.h"
|
#include "BitmapText.h"
|
||||||
#include "TransitionFade.h"
|
#include "TransitionBGAnimation.h"
|
||||||
#include "Quad.h"
|
#include "Quad.h"
|
||||||
#include "RandomSample.h"
|
#include "RandomSample.h"
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ protected:
|
|||||||
void MenuStart( PlayerNumber pn );
|
void MenuStart( PlayerNumber pn );
|
||||||
|
|
||||||
|
|
||||||
TransitionFade m_Fade;
|
BGAnimation m_Background;
|
||||||
BitmapText m_textQuestion;
|
BitmapText m_textQuestion;
|
||||||
Quad m_rectAnswerBox;
|
Quad m_rectAnswerBox;
|
||||||
BitmapText m_textAnswer[2]; // "YES" or "NO"
|
BitmapText m_textAnswer[2]; // "YES" or "NO"
|
||||||
@@ -44,5 +44,7 @@ protected:
|
|||||||
ScreenMessage m_SMSendWhenDone;
|
ScreenMessage m_SMSendWhenDone;
|
||||||
void(*m_pOnYes)();
|
void(*m_pOnYes)();
|
||||||
void(*m_pOnNo)();
|
void(*m_pOnNo)();
|
||||||
|
TransitionBGAnimation m_In;
|
||||||
|
TransitionBGAnimation m_Out;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -47,11 +47,8 @@ ScreenTextEntry::ScreenTextEntry( ScreenMessage SM_SendWhenDone, CString sQuesti
|
|||||||
m_sAnswer = CStringToWstring(sInitialAnswer);
|
m_sAnswer = CStringToWstring(sInitialAnswer);
|
||||||
m_bCancelled = false;
|
m_bCancelled = false;
|
||||||
|
|
||||||
m_Fade.SetTransitionTime( 0.5f );
|
m_Background.LoadFromAniDir( THEME->GetPathToB("ScreenPrompt background") );
|
||||||
m_Fade.SetDiffuse( RageColor(0,0,0,0.7f) );
|
this->AddChild( &m_Background );
|
||||||
m_Fade.SetOpened();
|
|
||||||
m_Fade.CloseWipingRight();
|
|
||||||
this->AddChild( &m_Fade );
|
|
||||||
|
|
||||||
m_textQuestion.LoadFromFont( THEME->GetPathToF("Common normal") );
|
m_textQuestion.LoadFromFont( THEME->GetPathToF("Common normal") );
|
||||||
m_textQuestion.SetText( sQuestion );
|
m_textQuestion.SetText( sQuestion );
|
||||||
@@ -71,7 +68,12 @@ ScreenTextEntry::ScreenTextEntry( ScreenMessage SM_SendWhenDone, CString sQuesti
|
|||||||
UpdateText();
|
UpdateText();
|
||||||
this->AddChild( &m_textAnswer );
|
this->AddChild( &m_textAnswer );
|
||||||
|
|
||||||
SOUNDMAN->PlayOnce( THEME->GetPathToS("Common prompt") );
|
m_In.Load( THEME->GetPathToB("ScreenPrompt in") );
|
||||||
|
m_In.StartTransitioning();
|
||||||
|
this->AddChild( &m_In );
|
||||||
|
|
||||||
|
m_Out.Load( THEME->GetPathToB("ScreenPrompt out") );
|
||||||
|
this->AddChild( &m_Out );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenTextEntry::UpdateText()
|
void ScreenTextEntry::UpdateText()
|
||||||
@@ -93,7 +95,7 @@ void ScreenTextEntry::DrawPrimitives()
|
|||||||
|
|
||||||
void ScreenTextEntry::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
void ScreenTextEntry::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
||||||
{
|
{
|
||||||
if( m_Fade.IsOpening() )
|
if( m_In.IsTransitioning() || m_Out.IsTransitioning() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( type != IET_FIRST_PRESS )
|
if( type != IET_FIRST_PRESS )
|
||||||
@@ -188,7 +190,7 @@ void ScreenTextEntry::MenuRight( PlayerNumber pn )
|
|||||||
|
|
||||||
void ScreenTextEntry::MenuStart( PlayerNumber pn )
|
void ScreenTextEntry::MenuStart( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
m_Fade.OpenWipingRight( SM_DoneOpeningWipingRight );
|
m_Out.StartTransitioning( SM_DoneOpeningWipingRight );
|
||||||
|
|
||||||
m_textQuestion.BeginTweening( 0.2f );
|
m_textQuestion.BeginTweening( 0.2f );
|
||||||
m_textQuestion.SetDiffuse( RageColor(1,1,1,0) );
|
m_textQuestion.SetDiffuse( RageColor(1,1,1,0) );
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include "Screen.h"
|
#include "Screen.h"
|
||||||
#include "BitmapText.h"
|
#include "BitmapText.h"
|
||||||
#include "TransitionFade.h"
|
#include "TransitionBGAnimation.h"
|
||||||
#include "Quad.h"
|
#include "Quad.h"
|
||||||
#include "RandomSample.h"
|
#include "RandomSample.h"
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ protected:
|
|||||||
|
|
||||||
void UpdateText();
|
void UpdateText();
|
||||||
|
|
||||||
TransitionFade m_Fade;
|
BGAnimation m_Background;
|
||||||
BitmapText m_textQuestion;
|
BitmapText m_textQuestion;
|
||||||
Quad m_rectAnswerBox;
|
Quad m_rectAnswerBox;
|
||||||
wstring m_sAnswer;
|
wstring m_sAnswer;
|
||||||
@@ -46,5 +46,7 @@ protected:
|
|||||||
void(*m_pOnOK)( CString sAnswer );
|
void(*m_pOnOK)( CString sAnswer );
|
||||||
void(*m_pOnCancel)();
|
void(*m_pOnCancel)();
|
||||||
bool m_bCancelled;
|
bool m_bCancelled;
|
||||||
|
TransitionBGAnimation m_In;
|
||||||
|
TransitionBGAnimation m_Out;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ IntDir=.\../Release6
|
|||||||
TargetDir=\stepmania\stepmania
|
TargetDir=\stepmania\stepmania
|
||||||
TargetName=StepMania
|
TargetName=StepMania
|
||||||
SOURCE="$(InputPath)"
|
SOURCE="$(InputPath)"
|
||||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||||
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
|
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
|
||||||
# End Special Build Tool
|
# End Special Build Tool
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ IntDir=.\../Debug6
|
|||||||
TargetDir=\stepmania\stepmania
|
TargetDir=\stepmania\stepmania
|
||||||
TargetName=StepMania-debug
|
TargetName=StepMania-debug
|
||||||
SOURCE="$(InputPath)"
|
SOURCE="$(InputPath)"
|
||||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||||
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
|
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
|
||||||
# End Special Build Tool
|
# End Special Build Tool
|
||||||
|
|
||||||
@@ -952,14 +952,6 @@ SOURCE=.\TransitionBGAnimation.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\TransitionFade.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\TransitionFade.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\TransitionOniFade.cpp
|
SOURCE=.\TransitionOniFade.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|||||||
@@ -1023,12 +1023,6 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
|||||||
<File
|
<File
|
||||||
RelativePath="TransitionBGAnimation.h">
|
RelativePath="TransitionBGAnimation.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath=".\TransitionFade.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\TransitionFade.h">
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="TransitionOniFade.cpp">
|
RelativePath="TransitionOniFade.cpp">
|
||||||
</File>
|
</File>
|
||||||
|
|||||||
@@ -1,46 +0,0 @@
|
|||||||
#include "global.h"
|
|
||||||
/*
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
Class: TransitionFade
|
|
||||||
|
|
||||||
Desc: See header.
|
|
||||||
|
|
||||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
|
||||||
Chris Danford
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include "RageUtil.h"
|
|
||||||
|
|
||||||
#include "TransitionFade.h"
|
|
||||||
#include "GameConstantsAndTypes.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TransitionFade::TransitionFade()
|
|
||||||
{
|
|
||||||
m_rect.StretchTo( RectI(0,0,SCREEN_WIDTH,SCREEN_HEIGHT) );
|
|
||||||
SetDiffuse( RageColor(0,0,0,1) ); // black
|
|
||||||
}
|
|
||||||
|
|
||||||
TransitionFade::~TransitionFade()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void TransitionFade::DrawPrimitives()
|
|
||||||
{
|
|
||||||
float fPercentageOpaque = 1 - GetPercentageOpen();
|
|
||||||
if( fPercentageOpaque == 0 )
|
|
||||||
return; // draw nothing
|
|
||||||
|
|
||||||
CLAMP( fPercentageOpaque, 0, 1 );
|
|
||||||
|
|
||||||
RageColor colorTemp = GetDiffuse();
|
|
||||||
colorTemp.a *= fPercentageOpaque;
|
|
||||||
m_rect.SetDiffuse( colorTemp );
|
|
||||||
m_rect.Draw();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
#ifndef TRANSITIONFADE_H
|
|
||||||
#define TRANSITIONFADE_H
|
|
||||||
/*
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
Class: TransitionFade
|
|
||||||
|
|
||||||
Desc: Fades whole screen to color.
|
|
||||||
|
|
||||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
|
||||||
Chris Danford
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include "Transition.h"
|
|
||||||
#include "Quad.h"
|
|
||||||
|
|
||||||
|
|
||||||
class TransitionFade : public Transition
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
TransitionFade();
|
|
||||||
virtual ~TransitionFade();
|
|
||||||
|
|
||||||
virtual void DrawPrimitives();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
Quad m_rect;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Reference in New Issue
Block a user