2002-08-27 03:59:22 +00:00
|
|
|
#include "stdafx.h"
|
2002-06-23 11:43:53 +00:00
|
|
|
/****************************************
|
|
|
|
|
ScreenEzSelectPlayer,cpp
|
|
|
|
|
Desc: See Header
|
|
|
|
|
Copyright (C):
|
|
|
|
|
Andrew Livy
|
|
|
|
|
*****************************************/
|
|
|
|
|
|
|
|
|
|
/* Includes */
|
|
|
|
|
|
|
|
|
|
#include "ScreenEz2SelectStyle.h"
|
|
|
|
|
#include "ScreenManager.h"
|
|
|
|
|
#include "PrefsManager.h"
|
|
|
|
|
#include "RageMusic.h"
|
|
|
|
|
#include "GameConstantsAndTypes.h"
|
2002-07-23 01:41:40 +00:00
|
|
|
#include "PrefsManager.h"
|
2002-06-23 11:43:53 +00:00
|
|
|
#include "GameManager.h"
|
|
|
|
|
#include "RageLog.h"
|
|
|
|
|
#include "AnnouncerManager.h"
|
2002-07-23 01:41:40 +00:00
|
|
|
#include "GameState.h"
|
2002-07-27 19:29:51 +00:00
|
|
|
#include "RageException.h"
|
|
|
|
|
#include "RageTimer.h"
|
2002-08-29 20:18:41 +00:00
|
|
|
#include "GameState.h"
|
2002-06-23 11:43:53 +00:00
|
|
|
|
|
|
|
|
/* Constants */
|
|
|
|
|
|
2002-08-27 23:31:41 +00:00
|
|
|
const ScreenMessage SM_GoToPrevScreen = ScreenMessage(SM_User + 1);
|
|
|
|
|
const ScreenMessage SM_GoToNextScreen = ScreenMessage(SM_User + 2);
|
2002-08-25 23:10:28 +00:00
|
|
|
|
2002-08-27 03:59:22 +00:00
|
|
|
|
2002-09-29 05:06:18 +00:00
|
|
|
#define CURSOR_X( p ) THEME->GetMetricF("ScreenEz2SelectStyle",ssprintf("CursorP%dX",p+1))
|
|
|
|
|
#define CURSOR_Y( i ) THEME->GetMetricF("ScreenEz2SelectStyle",ssprintf("CursorP%dY",i+1))
|
|
|
|
|
#define CONTROLLER_X( p ) THEME->GetMetricF("ScreenEz2SelectStyle",ssprintf("ControllerP%dX",p+1))
|
|
|
|
|
#define CONTROLLER_Y( i ) THEME->GetMetricF("ScreenEz2SelectStyle",ssprintf("ControllerP%dY",i+1))
|
|
|
|
|
#define HELP_TEXT THEME->GetMetric("ScreenEz2SelectStyle","HelpText")
|
|
|
|
|
#define TIMER_SECONDS THEME->GetMetricI("ScreenEz2SelectStyle","TimerSeconds")
|
|
|
|
|
#define NEXT_SCREEN THEME->GetMetric("ScreenEz2SelectStyle","NextScreen")
|
|
|
|
|
#define SCROLLING_ELEMENT_SPACING THEME->GetMetricI("ScreenEz2SelectStyle","ScrollingElementSpacing")
|
|
|
|
|
#define SCROLLING_LIST_X THEME->GetMetricF("ScreenEz2SelectStyle","ScrollingListX")
|
|
|
|
|
#define SCROLLING_LIST_Y THEME->GetMetricF("ScreenEz2SelectStyle","ScrollingListY")
|
|
|
|
|
#define CHANGE_BG_ANIMATIONS THEME->GetMetricB("ScreenEz2SelectStyle","ChangeBGAnimations")
|
2002-08-28 20:41:55 +00:00
|
|
|
|
2002-06-23 11:43:53 +00:00
|
|
|
const float TWEEN_TIME = 0.35f;
|
|
|
|
|
|
2002-08-13 23:26:46 +00:00
|
|
|
|
2002-06-23 11:43:53 +00:00
|
|
|
/************************************
|
|
|
|
|
ScreenEz2SelectStyle (Constructor)
|
|
|
|
|
Desc: Sets up the screen display
|
|
|
|
|
************************************/
|
|
|
|
|
|
|
|
|
|
ScreenEz2SelectStyle::ScreenEz2SelectStyle()
|
|
|
|
|
{
|
2002-07-31 19:40:40 +00:00
|
|
|
LOG->Trace( "ScreenEz2SelectStyle::ScreenEz2SelectStyle()" );
|
2002-06-23 11:43:53 +00:00
|
|
|
|
2002-08-29 20:18:41 +00:00
|
|
|
|
|
|
|
|
GAMESTATE->m_PlayMode = PLAY_MODE_ARCADE; // the only mode you can select on this screen
|
2002-09-25 16:32:58 +00:00
|
|
|
|
2002-09-25 17:29:04 +00:00
|
|
|
|
2002-09-13 18:06:36 +00:00
|
|
|
/*********** TODO: MAKE THIS WORK FOR ALL GAME STYLES! *************/
|
2002-09-25 17:29:04 +00:00
|
|
|
m_StyleListFrame.Load( THEME->GetPathTo("Graphics","StyleListFrame"));
|
2002-09-29 05:06:18 +00:00
|
|
|
m_StyleListFrame.SetXY( SCROLLING_LIST_X, SCROLLING_LIST_Y);
|
2002-09-25 17:29:04 +00:00
|
|
|
this->AddChild( &m_StyleListFrame );
|
2002-09-25 16:32:58 +00:00
|
|
|
|
2002-09-18 18:24:33 +00:00
|
|
|
m_ScrollingList.SetXY( CENTER_X, SCROLLING_LIST_Y );
|
|
|
|
|
m_ScrollingList.SetSpacing( SCROLLING_ELEMENT_SPACING );
|
|
|
|
|
m_ScrollingList.SetNumberVisible( 9 );
|
|
|
|
|
this->AddChild( &m_ScrollingList );
|
2002-07-15 18:17:12 +00:00
|
|
|
|
2002-09-25 17:29:04 +00:00
|
|
|
m_SelectedStyleFrame.Load( THEME->GetPathTo("Graphics","SelectedStyleFrame"));
|
|
|
|
|
m_SelectedStyleFrame.SetXY( CENTER_X, SCROLLING_LIST_Y);
|
|
|
|
|
this->AddChild( &m_SelectedStyleFrame );
|
2002-08-28 20:41:55 +00:00
|
|
|
|
2002-08-29 20:18:41 +00:00
|
|
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
2002-08-28 20:41:55 +00:00
|
|
|
{
|
2002-09-25 16:32:58 +00:00
|
|
|
// add the controllers, change their graphic if the player is not selected later
|
|
|
|
|
m_sprControllers[p].Load( THEME->GetPathTo("Graphics",ssprintf("select player controller selected p%d", p+1)) );
|
|
|
|
|
m_sprControllers[p].SetXY( CONTROLLER_X(p), CONTROLLER_Y(p) );
|
|
|
|
|
this->AddChild( &m_sprControllers[p] );
|
|
|
|
|
|
2002-08-29 20:18:41 +00:00
|
|
|
if( GAMESTATE->m_bSideIsJoined[p] ) // if side is already joined
|
|
|
|
|
continue; // don't show bobbing join and blob
|
|
|
|
|
|
2002-09-25 16:32:58 +00:00
|
|
|
m_sprControllers[p].Load( THEME->GetPathTo("Graphics",ssprintf("select player controller p%d", p+1)) );
|
2002-08-29 20:18:41 +00:00
|
|
|
|
|
|
|
|
m_sprCursors[p].Load( THEME->GetPathTo("Graphics",ssprintf("select player cursor p%d",p+1)) );
|
|
|
|
|
m_sprCursors[p].SetXY( CURSOR_X(p), CURSOR_Y(p) );
|
|
|
|
|
m_sprCursors[p].SetEffectBouncing( D3DXVECTOR3(0,10,0), 0.5f );
|
2002-09-02 21:59:58 +00:00
|
|
|
this->AddChild( &m_sprCursors[p] );
|
2002-08-28 20:41:55 +00:00
|
|
|
}
|
2002-08-29 20:18:41 +00:00
|
|
|
|
2002-06-23 11:43:53 +00:00
|
|
|
|
|
|
|
|
m_Menu.Load(
|
2002-09-24 02:55:32 +00:00
|
|
|
THEME->GetPathTo("BGAnimations","select style"),
|
2002-08-13 23:26:46 +00:00
|
|
|
THEME->GetPathTo("Graphics","select style top edge"),
|
2002-09-03 22:31:06 +00:00
|
|
|
HELP_TEXT, true, true, TIMER_SECONDS
|
2002-06-23 11:43:53 +00:00
|
|
|
);
|
2002-09-02 21:59:58 +00:00
|
|
|
this->AddChild( &m_Menu );
|
2002-06-23 11:43:53 +00:00
|
|
|
|
2002-08-13 23:26:46 +00:00
|
|
|
m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") );
|
2002-09-29 05:06:18 +00:00
|
|
|
m_soundChange.Load( THEME->GetPathTo("Sounds","select style change"), 10 );
|
2002-06-23 11:43:53 +00:00
|
|
|
|
2002-08-29 20:18:41 +00:00
|
|
|
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo("select style intro") );
|
2002-06-23 11:43:53 +00:00
|
|
|
|
2002-08-27 16:53:25 +00:00
|
|
|
MUSIC->LoadAndPlayIfNotAlready( THEME->GetPathTo("Sounds","select style music") );
|
|
|
|
|
|
2002-09-29 05:06:18 +00:00
|
|
|
RefreshModeChoices();
|
2002-08-29 20:18:41 +00:00
|
|
|
|
|
|
|
|
TweenOnScreen();
|
2002-06-23 11:43:53 +00:00
|
|
|
m_Menu.TweenOnScreenFromBlack( SM_None );
|
2002-09-13 18:06:36 +00:00
|
|
|
|
2002-06-23 11:43:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/************************************
|
|
|
|
|
~ScreenEz2SelectStyle (Destructor)
|
|
|
|
|
Desc: Writes line to log when screen
|
|
|
|
|
is terminated.
|
|
|
|
|
************************************/
|
|
|
|
|
ScreenEz2SelectStyle::~ScreenEz2SelectStyle()
|
|
|
|
|
{
|
2002-07-31 19:40:40 +00:00
|
|
|
LOG->Trace( "ScreenEz2SelectStyle::~ScreenEz2SelectStyle()" );
|
2002-06-23 11:43:53 +00:00
|
|
|
}
|
|
|
|
|
|
2002-08-29 20:18:41 +00:00
|
|
|
/************************************
|
|
|
|
|
Update
|
|
|
|
|
Desc: Animates the 1p/2p selection
|
|
|
|
|
************************************/
|
|
|
|
|
void ScreenEz2SelectStyle::Update( float fDeltaTime )
|
|
|
|
|
{
|
|
|
|
|
Screen::Update( fDeltaTime );
|
|
|
|
|
}
|
2002-06-23 11:43:53 +00:00
|
|
|
|
|
|
|
|
/************************************
|
|
|
|
|
DrawPrimitives
|
|
|
|
|
Desc: Draws the screen =P
|
|
|
|
|
************************************/
|
|
|
|
|
|
|
|
|
|
void ScreenEz2SelectStyle::DrawPrimitives()
|
|
|
|
|
{
|
|
|
|
|
m_Menu.DrawBottomLayer();
|
|
|
|
|
Screen::DrawPrimitives();
|
|
|
|
|
m_Menu.DrawTopLayer();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/************************************
|
|
|
|
|
Input
|
|
|
|
|
Desc: Handles player input.
|
|
|
|
|
************************************/
|
|
|
|
|
void ScreenEz2SelectStyle::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
|
|
|
|
{
|
2002-07-31 19:40:40 +00:00
|
|
|
LOG->Trace( "ScreenEz2SelectStyle::Input()" );
|
2002-06-23 11:43:53 +00:00
|
|
|
|
|
|
|
|
if( m_Menu.IsClosing() )
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/************************************
|
|
|
|
|
HandleScreenMessage
|
|
|
|
|
Desc: Handles Screen Messages and changes
|
|
|
|
|
game states.
|
|
|
|
|
************************************/
|
|
|
|
|
void ScreenEz2SelectStyle::HandleScreenMessage( const ScreenMessage SM )
|
|
|
|
|
{
|
|
|
|
|
Screen::HandleScreenMessage( SM );
|
|
|
|
|
|
|
|
|
|
switch( SM )
|
|
|
|
|
{
|
|
|
|
|
case SM_MenuTimer:
|
2002-09-29 05:06:18 +00:00
|
|
|
MenuStart(PLAYER_1);
|
|
|
|
|
m_Menu.StopTimer();
|
|
|
|
|
|
|
|
|
|
TweenOffScreen();
|
|
|
|
|
m_Menu.TweenOffScreenToMenu( SM_GoToNextScreen );
|
2002-06-23 11:43:53 +00:00
|
|
|
break;
|
2002-08-27 23:31:41 +00:00
|
|
|
case SM_GoToPrevScreen:
|
2002-06-23 11:43:53 +00:00
|
|
|
MUSIC->Stop();
|
2002-08-27 03:59:22 +00:00
|
|
|
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
|
2002-06-23 11:43:53 +00:00
|
|
|
break;
|
2002-08-27 23:31:41 +00:00
|
|
|
case SM_GoToNextScreen:
|
2002-08-27 03:59:22 +00:00
|
|
|
SCREENMAN->SetNewScreen( NEXT_SCREEN );
|
2002-06-23 11:43:53 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2002-09-29 05:06:18 +00:00
|
|
|
void ScreenEz2SelectStyle::RefreshModeChoices()
|
2002-08-29 20:18:41 +00:00
|
|
|
{
|
2002-09-29 05:06:18 +00:00
|
|
|
int iNumSidesJoined = GAMESTATE->GetNumSidesJoined();
|
2002-08-29 20:18:41 +00:00
|
|
|
|
2002-09-29 05:06:18 +00:00
|
|
|
GAMEMAN->GetModesChoicesForGame( GAMESTATE->m_CurGame, m_aPossibleModeChoices );
|
2002-08-29 20:18:41 +00:00
|
|
|
|
2002-09-29 05:06:18 +00:00
|
|
|
CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName;
|
2002-08-29 20:18:41 +00:00
|
|
|
|
|
|
|
|
CStringArray asGraphicPaths;
|
2002-09-29 05:06:18 +00:00
|
|
|
for( int i=0; i<m_aPossibleModeChoices.GetSize(); i++ )
|
2002-08-29 20:18:41 +00:00
|
|
|
{
|
2002-09-29 05:06:18 +00:00
|
|
|
const ModeChoice& choice = m_aPossibleModeChoices[i];
|
2002-08-29 20:18:41 +00:00
|
|
|
|
2002-09-29 05:06:18 +00:00
|
|
|
if( choice.numSidesJoinedToPlay == iNumSidesJoined )
|
2002-10-29 07:58:44 +00:00
|
|
|
asGraphicPaths.Add( THEME->GetPathTo("Graphics", ssprintf("select mode %s %s", sGameName.GetString(), choice.name) ) );
|
2002-08-29 20:18:41 +00:00
|
|
|
}
|
2002-09-29 05:06:18 +00:00
|
|
|
|
2002-08-29 20:18:41 +00:00
|
|
|
m_ScrollingList.Load( asGraphicPaths );
|
|
|
|
|
}
|
2002-06-23 11:43:53 +00:00
|
|
|
|
2002-09-29 05:06:18 +00:00
|
|
|
|
2002-06-23 11:43:53 +00:00
|
|
|
/************************************
|
|
|
|
|
MenuBack
|
|
|
|
|
Desc: Actions performed when a player
|
|
|
|
|
presses the button bound to back
|
|
|
|
|
************************************/
|
2002-09-04 03:49:08 +00:00
|
|
|
void ScreenEz2SelectStyle::MenuBack( PlayerNumber pn )
|
2002-06-23 11:43:53 +00:00
|
|
|
{
|
|
|
|
|
MUSIC->Stop();
|
|
|
|
|
|
2002-08-27 23:31:41 +00:00
|
|
|
m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true );
|
2002-06-23 11:43:53 +00:00
|
|
|
}
|
|
|
|
|
|
2002-09-29 05:06:18 +00:00
|
|
|
void ScreenEz2SelectStyle::AfterChange()
|
|
|
|
|
{
|
|
|
|
|
CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName;
|
|
|
|
|
const ModeChoice& choice = m_aPossibleModeChoices[ m_ScrollingList.GetSelection() ];
|
|
|
|
|
if( CHANGE_BG_ANIMATIONS )
|
2002-10-29 07:58:44 +00:00
|
|
|
m_Menu.m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations",ssprintf("select mode %s %s", sGameName.GetString(), choice.name)) );
|
2002-09-29 05:06:18 +00:00
|
|
|
}
|
2002-07-08 19:08:15 +00:00
|
|
|
|
2002-09-04 03:49:08 +00:00
|
|
|
void ScreenEz2SelectStyle::MenuLeft( PlayerNumber pn )
|
2002-06-23 11:43:53 +00:00
|
|
|
{
|
2002-08-29 20:18:41 +00:00
|
|
|
m_ScrollingList.Left();
|
|
|
|
|
m_soundChange.Play();
|
2002-09-29 05:06:18 +00:00
|
|
|
AfterChange();
|
2002-06-23 11:43:53 +00:00
|
|
|
}
|
|
|
|
|
|
2002-09-04 03:49:08 +00:00
|
|
|
void ScreenEz2SelectStyle::MenuRight( PlayerNumber pn )
|
2002-06-23 11:43:53 +00:00
|
|
|
{
|
2002-08-29 20:18:41 +00:00
|
|
|
m_ScrollingList.Right();
|
|
|
|
|
m_soundChange.Play();
|
2002-09-29 05:06:18 +00:00
|
|
|
AfterChange();
|
2002-06-23 11:43:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/************************************
|
2002-08-29 20:18:41 +00:00
|
|
|
MenuDown
|
2002-06-23 11:43:53 +00:00
|
|
|
Desc: Actions performed when a player
|
2002-08-29 20:18:41 +00:00
|
|
|
presses the button bound to down
|
2002-06-23 11:43:53 +00:00
|
|
|
************************************/
|
2002-09-04 03:49:08 +00:00
|
|
|
void ScreenEz2SelectStyle::MenuDown( PlayerNumber pn )
|
2002-06-23 11:43:53 +00:00
|
|
|
{
|
2002-09-04 03:49:08 +00:00
|
|
|
if( GAMESTATE->m_bSideIsJoined[pn] ) // already joined
|
2002-08-29 20:18:41 +00:00
|
|
|
return; // ignore
|
2002-08-25 23:10:28 +00:00
|
|
|
|
2002-09-04 03:49:08 +00:00
|
|
|
MenuStart( pn );
|
2002-06-23 11:43:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/************************************
|
|
|
|
|
MenuStart
|
|
|
|
|
Desc: Actions performed when a player
|
|
|
|
|
presses the button bound to start
|
|
|
|
|
************************************/
|
2002-09-04 03:49:08 +00:00
|
|
|
void ScreenEz2SelectStyle::MenuStart( PlayerNumber pn )
|
2002-06-23 11:43:53 +00:00
|
|
|
{
|
2002-09-29 05:06:18 +00:00
|
|
|
if( !GAMESTATE->m_bSideIsJoined[pn] )
|
2002-07-08 17:25:02 +00:00
|
|
|
{
|
2002-08-29 20:18:41 +00:00
|
|
|
// join them
|
2002-09-04 03:49:08 +00:00
|
|
|
GAMESTATE->m_bSideIsJoined[pn] = true;
|
2002-08-29 20:18:41 +00:00
|
|
|
SCREENMAN->RefreshCreditsMessages();
|
|
|
|
|
m_soundSelect.Play();
|
2002-09-04 03:49:08 +00:00
|
|
|
m_sprCursors[pn].BeginTweening( 0.25f );
|
|
|
|
|
m_sprCursors[pn].SetTweenZoomY( 0 );
|
2002-09-25 16:32:58 +00:00
|
|
|
//m_sprControllers[pn].BeginTweening( 0.25f );
|
|
|
|
|
//m_sprControllers[pn].SetTweenZoomY( 0 );
|
|
|
|
|
// NOW replace with the new controller!
|
|
|
|
|
m_sprControllers[pn].Load( THEME->GetPathTo("Graphics",ssprintf("select player controller selected p%d", pn+1)) );
|
|
|
|
|
|
2002-09-29 05:06:18 +00:00
|
|
|
RefreshModeChoices();
|
2002-09-18 18:24:33 +00:00
|
|
|
|
2002-08-29 20:18:41 +00:00
|
|
|
m_ScrollingList.SetSelection( 0 );
|
2002-07-08 17:25:02 +00:00
|
|
|
}
|
2002-08-29 20:18:41 +00:00
|
|
|
else
|
2002-07-08 17:25:02 +00:00
|
|
|
{
|
2002-08-29 20:18:41 +00:00
|
|
|
// made a selection
|
|
|
|
|
m_soundSelect.Play();
|
2002-09-17 22:48:38 +00:00
|
|
|
|
2002-09-29 05:06:18 +00:00
|
|
|
const ModeChoice& choice = m_aPossibleModeChoices[ m_ScrollingList.GetSelection() ];
|
|
|
|
|
GAMESTATE->m_CurStyle = choice.style;
|
|
|
|
|
GAMESTATE->m_PlayMode = choice.pm;
|
|
|
|
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
|
|
|
|
GAMESTATE->m_PreferredDifficulty[p] = choice.dc;
|
2002-09-18 18:24:33 +00:00
|
|
|
|
2002-08-29 20:18:41 +00:00
|
|
|
TweenOffScreen();
|
|
|
|
|
m_Menu.TweenOffScreenToMenu( SM_GoToNextScreen );
|
2002-07-08 17:25:02 +00:00
|
|
|
}
|
2002-07-18 17:32:02 +00:00
|
|
|
}
|
2002-07-15 18:17:12 +00:00
|
|
|
|
2002-08-29 20:18:41 +00:00
|
|
|
void ScreenEz2SelectStyle::TweenOnScreen()
|
2002-07-18 17:32:02 +00:00
|
|
|
{
|
2002-08-29 20:18:41 +00:00
|
|
|
float fOriginalZoomY = m_ScrollingList.GetZoomY();
|
|
|
|
|
m_ScrollingList.BeginTweening( 0.5f );
|
|
|
|
|
m_ScrollingList.SetTweenZoomY( fOriginalZoomY );
|
|
|
|
|
|
|
|
|
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
2002-07-15 23:53:13 +00:00
|
|
|
{
|
2002-08-29 20:18:41 +00:00
|
|
|
float fOffScreenOffset = float( (p==PLAYER_1) ? -SCREEN_WIDTH/2 : +SCREEN_WIDTH/2 );
|
|
|
|
|
|
|
|
|
|
float fOriginalX;
|
|
|
|
|
|
|
|
|
|
fOriginalX = m_sprCursors[p].GetX();
|
|
|
|
|
m_sprCursors[p].SetX( m_sprCursors[p].GetX()+fOffScreenOffset );
|
|
|
|
|
m_sprCursors[p].BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END );
|
|
|
|
|
m_sprCursors[p].SetTweenX( fOriginalX );
|
|
|
|
|
|
|
|
|
|
fOriginalX = m_sprControllers[p].GetX();
|
|
|
|
|
m_sprControllers[p].SetX( m_sprCursors[p].GetX()+fOffScreenOffset );
|
|
|
|
|
m_sprControllers[p].BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END );
|
|
|
|
|
m_sprControllers[p].SetTweenX( fOriginalX );
|
2002-07-15 18:17:12 +00:00
|
|
|
}
|
2002-06-23 11:43:53 +00:00
|
|
|
}
|
2002-07-08 17:25:02 +00:00
|
|
|
|
2002-08-29 20:18:41 +00:00
|
|
|
void ScreenEz2SelectStyle::TweenOffScreen()
|
2002-08-28 20:41:55 +00:00
|
|
|
{
|
2002-08-29 20:18:41 +00:00
|
|
|
m_ScrollingList.BeginTweening( 0.5f );
|
|
|
|
|
m_ScrollingList.SetTweenZoomY( 0 );
|
2002-08-28 20:41:55 +00:00
|
|
|
|
2002-08-29 20:18:41 +00:00
|
|
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
|
|
|
|
{
|
|
|
|
|
float fOffScreenOffset = float( (p==PLAYER_1) ? -SCREEN_WIDTH : +SCREEN_WIDTH );
|
2002-08-28 20:41:55 +00:00
|
|
|
|
2002-08-29 20:18:41 +00:00
|
|
|
m_sprCursors[p].BeginTweening( 0.5f, Actor::TWEEN_BIAS_END );
|
|
|
|
|
m_sprCursors[p].SetTweenX( m_sprCursors[p].GetX()+fOffScreenOffset );
|
|
|
|
|
m_sprControllers[p].BeginTweening( 0.5f, Actor::TWEEN_BIAS_END );
|
|
|
|
|
m_sprControllers[p].SetTweenX( m_sprCursors[p].GetX()+fOffScreenOffset );
|
|
|
|
|
}
|
2002-08-28 20:41:55 +00:00
|
|
|
}
|