fix glitches in ScreenSelectGroup and ScreenSelectStyle

This commit is contained in:
Chris Danford
2003-03-10 02:29:01 +00:00
parent 682d7502fa
commit 89040e1ba1
6 changed files with 44 additions and 15 deletions
+5
View File
@@ -208,6 +208,11 @@ void ScreenManager::LoadPreppedScreen()
m_ScreenBuffered = NULL;
}
void ScreenManager::DeletePreppedScreen()
{
SAFE_DELETE( m_ScreenBuffered );
}
void ScreenManager::SetNewScreen( Screen *pNewScreen )
{
RefreshCreditsMessages();
+1
View File
@@ -39,6 +39,7 @@ public:
void PrepNewScreen( CString sClassName );
void LoadPreppedScreen();
void DeletePreppedScreen();
void SetNewScreen( CString sClassName );
void AddNewScreenToTop( CString sClassName );
void Prompt( ScreenMessage SM_SendWhenDone, CString sText, bool bYesNo = false, bool bDefaultAnswer = false, void(*OnYes)() = NULL, void(*OnNo)() = NULL );
+10 -5
View File
@@ -219,7 +219,7 @@ ScreenSelectMusic::ScreenSelectMusic()
m_sprOptionsMessage.SetXY( CENTER_X, CENTER_Y );
m_sprOptionsMessage.SetZoom( 1 );
m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,0) );
this->AddChild( &m_sprOptionsMessage );
//this->AddChild( &m_sprOptionsMessage ); // we have to draw this manually over the top of transitions
m_soundSelect.Load( THEME->GetPathTo("Sounds","Common start") );
@@ -252,6 +252,7 @@ void ScreenSelectMusic::DrawPrimitives()
m_Menu.DrawBottomLayer();
Screen::DrawPrimitives();
m_Menu.DrawTopLayer();
m_sprOptionsMessage.Draw();
}
void ScreenSelectMusic::TweenOnScreen()
@@ -391,6 +392,8 @@ void ScreenSelectMusic::TweenScoreOnAndOffAfterChangeSort()
void ScreenSelectMusic::Update( float fDeltaTime )
{
Screen::Update( fDeltaTime );
m_sprOptionsMessage.Update( fDeltaTime );
if( m_fPlaySampleCountdown > 0 )
{
@@ -715,13 +718,15 @@ void ScreenSelectMusic::MenuStart( PlayerNumber pn )
if( !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() )
{
float fShowSeconds = m_Menu.m_Out.GetLengthSeconds();
// show "hold START for options"
m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,0) );
m_sprOptionsMessage.BeginTweening( 0.25f ); // fade in
m_sprOptionsMessage.BeginTweening( 0.15f ); // fade in
m_sprOptionsMessage.SetTweenZoomY( 1 );
m_sprOptionsMessage.SetTweenDiffuse( RageColor(1,1,1,1) );
m_sprOptionsMessage.BeginTweening( 2.0f ); // sleep
m_sprOptionsMessage.BeginTweening( 0.25f ); // fade out
m_sprOptionsMessage.BeginTweening( fShowSeconds-0.3f ); // sleep
m_sprOptionsMessage.BeginTweening( 0.15f ); // fade out
m_sprOptionsMessage.SetTweenDiffuse( RageColor(1,1,1,0) );
m_sprOptionsMessage.SetTweenZoomY( 0 );
@@ -730,7 +735,7 @@ void ScreenSelectMusic::MenuStart( PlayerNumber pn )
* hit accidentally. Accept an initial START right away, though,
* so we don't ignore deliberate fast presses (which would be
* annoying). */
this->SendScreenMessage( SM_AllowOptionsMenuRepeat, 0.75f );
this->SendScreenMessage( SM_AllowOptionsMenuRepeat, 0.5f );
}
m_Menu.StartTransitioning( SM_GoToNextScreen );
+16
View File
@@ -71,6 +71,9 @@ ScreenStage::ScreenStage()
m_In.StartTransitioning( SM_LoadPrepedScreen );
float fStartFadingOutSeconds = m_Background.GetLengthSeconds() - m_Out.GetLengthSeconds();
this->SendScreenMessage( SM_BeginFadingOut, fStartFadingOutSeconds );
m_Back.Load( THEME->GetPathTo("BGAnimations","Common back") );
this->AddChild( &m_Back );
//g_StageType = (StageType)STAGE_TYPE;
@@ -583,5 +586,18 @@ void ScreenStage::HandleScreenMessage( const ScreenMessage SM )
case SM_GoToNextScreen:
SCREENMAN->LoadPreppedScreen(); /* use prepped */
break;
case SM_GoToPrevScreen:
SCREENMAN->DeletePreppedScreen();
SCREENMAN->SetNewScreen( "ScreenSelectMusic" );
break;
}
}
void ScreenStage::MenuBack( PlayerNumber pn )
{
if( m_In.IsTransitioning() || m_Out.IsTransitioning() || m_Back.IsTransitioning() )
return;
this->ClearMessageQueue();
m_Back.StartTransitioning( SM_GoToPrevScreen );
}
+3 -1
View File
@@ -20,6 +20,8 @@ public:
virtual void Update( float fDeltaTime );
virtual void DrawPrimitives();
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuBack( PlayerNumber pn );
private:
@@ -49,7 +51,7 @@ private:
Quad m_quadMask; // write this into ZBuffer as a mask
*/
TransitionBGAnimation m_In, m_Out;
TransitionBGAnimation m_In, m_Out, m_Back;
BGAnimation m_Background;
protected: