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
+9 -9
View File
@@ -69,15 +69,15 @@ NextScreen4=ScreenSelectDifficulty
NextScreen5=ScreenSelectDifficulty
JointPremiumOnCommand=x,550;y,84;xoffset,400;bounceend,0.5;xoffset,-400;glowshift
JointPremiumOffCommand=bouncebegin,0.5;xoffset,400
Icon1OnCommand=x,60;y,84;xoffset,-800;sleep,0.20;decelerate,0.4;xoffset,800
Icon1OnCommand=x,60;y,84;xoffset,-800;sleep,0.20;decelerate,0.3;xoffset,800
Icon1OffCommand=bouncebegin,0.5;zoomy,0
Icon2OnCommand=x,140;y,84;xoffset,-800;sleep,0.15;decelerate,0.4;xoffset,800
Icon2OnCommand=x,140;y,84;xoffset,-800;sleep,0.15;decelerate,0.3;xoffset,800
Icon2OffCommand=bouncebegin,0.5;zoomy,0
Icon3OnCommand=x,220;y,84;xoffset,-800;sleep,0.10;decelerate,0.4;xoffset,800
Icon3OnCommand=x,220;y,84;xoffset,-800;sleep,0.10;decelerate,0.3;xoffset,800
Icon3OffCommand=bouncebegin,0.5;zoomy,0
Icon4OnCommand=x,300;y,84;xoffset,-800;sleep,0.05;decelerate,0.4;xoffset,800
Icon4OnCommand=x,300;y,84;xoffset,-800;sleep,0.05;decelerate,0.3;xoffset,800
Icon4OffCommand=bouncebegin,0.5;zoomy,0
Icon5OnCommand=x,380;y,84;xoffset,-800;sleep,0.00;decelerate,0.4;xoffset,800
Icon5OnCommand=x,380;y,84;xoffset,-800;sleep,0.00;decelerate,0.3;xoffset,800
Icon5OffCommand=bouncebegin,0.5;zoomy,0
IconGainFocusCommand=glowshift;effectperiod,0.5
IconLoseFocusCommand=stopeffect
@@ -206,13 +206,13 @@ NextScreenBattle=ScreenInstructions
[ScreenSelectGroup]
FrameOnCommand=x,180;y,160;xoffset,-400;bounceend,0.5;xoffset,400
FrameOffCommand=bouncebegin,0.5;xoffset,-400
FrameOffCommand=sleep,0.3;bouncebegin,0.5;xoffset,-400
BannerOnCommand=x,182;y,158;xoffset,-400;bounceend,0.5;xoffset,400
BannerOffCommand=bouncebegin,0.5;xoffset,-400
BannerOffCommand=sleep,0.3;bouncebegin,0.5;xoffset,-400
BannerWidth=288
BannerHeight=92
NumberOnCommand=x,116;y,224;horizalign,right;shadowlength,0;xoffset,-400;bounceend,0.5;xoffset,400
NumberOffCommand=bouncebegin,0.5;xoffset,-400
NumberOffCommand=sleep,0.3;bouncebegin,0.5;xoffset,-400
ExplanationOnCommand=x,110;y,66;xoffset,-400;bounceend,0.5;xoffset,400
ExplanationOffCommand=bouncebegin,0.5;xoffset,-400
ContentsOnCommand=x,320;y,260;diffuse,1,1,1,0;linear,0.5;diffuse,1,1,1,1
@@ -725,7 +725,7 @@ PulseZoom=1.2
TweenSeconds=0.05
[HoldJudgment]
NGCommand=shadowlength,4;diffuse,1,1,1,1;zoom,1;y,-10;linear,0.8;y,10
NGCommand=shadowlength,4;diffuse,1,1,1,1;zoom,1;y,-10;linear,0.8;y,10;sleep,0.5;linear,0;diffuse,1,1,1,0
OKCommand=shadowlength,4;diffuse,1,1,1,1;zoom,1.25;linear,0.3;zoomx,1;zoomy,1;sleep,0.5;linear,0;diffuse,1,1,1,0
[Player]
+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: