Fix ScreenJukebox, ScreenMusicScroll
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1 @@
|
|||||||
|
_fade in with sound
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
_fade out with sound
|
||||||
@@ -1 +1 @@
|
|||||||
_fade in
|
_fade in with sound
|
||||||
@@ -34,7 +34,7 @@ JukeboxMenu::JukeboxMenu()
|
|||||||
|
|
||||||
for( i=0; i<2; i++ )
|
for( i=0; i<2; i++ )
|
||||||
{
|
{
|
||||||
m_sprArrows[i].Load( THEME->GetPathTo("Graphics",ssprintf("jukebox menu %s",(i==0?"left":"right"))) );
|
m_sprArrows[i].Load( THEME->GetPathTo("Graphics",ssprintf("JukeboxMenu %s",(i==0?"left":"right"))) );
|
||||||
m_sprArrows[i].SetX( ARROWS_X(i) );
|
m_sprArrows[i].SetX( ARROWS_X(i) );
|
||||||
this->AddChild( &m_sprArrows[i] );
|
this->AddChild( &m_sprArrows[i] );
|
||||||
}
|
}
|
||||||
@@ -59,8 +59,8 @@ JukeboxMenu::JukeboxMenu()
|
|||||||
this->AddChild( &m_textValue[i] );
|
this->AddChild( &m_textValue[i] );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_soundChangeRow.Load( THEME->GetPathTo("sounds","jukebox menu row") );
|
m_soundChangeRow.Load( THEME->GetPathTo("sounds","JukeboxMenu row") );
|
||||||
m_soundChangeValue.Load( THEME->GetPathTo("sounds","jukebox menu value") );
|
m_soundChangeValue.Load( THEME->GetPathTo("sounds","JukeboxMenu value") );
|
||||||
|
|
||||||
|
|
||||||
// fill in data structures
|
// fill in data structures
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ ScreenEditMenu::ScreenEditMenu()
|
|||||||
// m_Selector.AllowNewNotes();
|
// m_Selector.AllowNewNotes();
|
||||||
this->AddChild( &m_Selector );
|
this->AddChild( &m_Selector );
|
||||||
|
|
||||||
m_Menu.Load( "ScreenEditMenu", false );
|
m_Menu.Load( "ScreenEditMenu", false ); // disable timer
|
||||||
this->AddChild( &m_Menu );
|
this->AddChild( &m_Menu );
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -831,7 +831,6 @@ void ScreenEvaluation::MenuStart( PlayerNumber pn )
|
|||||||
/* Tween the screen out, but leave the MenuElements where they are.
|
/* Tween the screen out, but leave the MenuElements where they are.
|
||||||
* Play the "swoosh" sound manually (would normally be played by the ME
|
* Play the "swoosh" sound manually (would normally be played by the ME
|
||||||
* tween out). */
|
* tween out). */
|
||||||
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu swoosh") );
|
|
||||||
TweenOffScreen();
|
TweenOffScreen();
|
||||||
SCREENMAN->SendMessageToTopScreen( SM_GoToFinalEvaluation, MENU_ELEMENTS_TWEEN_TIME );
|
SCREENMAN->SendMessageToTopScreen( SM_GoToFinalEvaluation, MENU_ELEMENTS_TWEEN_TIME );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -411,6 +411,10 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration )
|
|||||||
m_Inventory.RefreshPossibleItems();
|
m_Inventory.RefreshPossibleItems();
|
||||||
this->AddChild( &m_Inventory );
|
this->AddChild( &m_Inventory );
|
||||||
|
|
||||||
|
m_textDebug.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
||||||
|
m_textDebug.SetXY( DEBUG_X, DEBUG_Y );
|
||||||
|
m_textDebug.SetDiffuse( RageColor(1,1,1,1) );
|
||||||
|
this->AddChild( &m_textDebug );
|
||||||
|
|
||||||
|
|
||||||
if( !bDemonstration ) // only load if we're going to use it
|
if( !bDemonstration ) // only load if we're going to use it
|
||||||
@@ -455,13 +459,6 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Debug is drawn on top of all these things
|
|
||||||
m_textDebug.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
|
||||||
m_textDebug.SetXY( DEBUG_X, DEBUG_Y );
|
|
||||||
m_textDebug.SetDiffuse( RageColor(1,1,1,1) );
|
|
||||||
this->AddChild( &m_textDebug );
|
|
||||||
|
|
||||||
|
|
||||||
/* LoadNextSong first, since that positions some elements which need to be
|
/* LoadNextSong first, since that positions some elements which need to be
|
||||||
* positioned before we TweenOnScreen. */
|
* positioned before we TweenOnScreen. */
|
||||||
LoadNextSong();
|
LoadNextSong();
|
||||||
|
|||||||
@@ -156,66 +156,17 @@ void ScreenJukebox::Input( const DeviceInput& DeviceI, const InputEventType type
|
|||||||
//LOG->Trace( "ScreenJukebox::Input()" );
|
//LOG->Trace( "ScreenJukebox::Input()" );
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// This should be the same as ScreenAttract::Input()
|
|
||||||
//
|
|
||||||
|
|
||||||
if(type != IET_FIRST_PRESS) return; // don't care
|
|
||||||
|
|
||||||
if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_F3 )
|
|
||||||
{
|
|
||||||
(int&)PREFSMAN->m_CoinMode = (PREFSMAN->m_CoinMode+1) % PrefsManager::NUM_COIN_MODES;
|
|
||||||
|
|
||||||
CString sMessage = "Coin Mode: ";
|
|
||||||
switch( PREFSMAN->m_CoinMode )
|
|
||||||
{
|
|
||||||
case PrefsManager::COIN_HOME: sMessage += "HOME"; break;
|
|
||||||
case PrefsManager::COIN_PAY: sMessage += "PAY"; break;
|
|
||||||
case PrefsManager::COIN_FREE: sMessage += "FREE"; break;
|
|
||||||
}
|
|
||||||
SCREENMAN->RefreshCreditsMessages();
|
|
||||||
SCREENMAN->SystemMessage( sMessage );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( MenuI.IsValid() )
|
if( MenuI.IsValid() )
|
||||||
{
|
{
|
||||||
switch( MenuI.button )
|
switch( MenuI.button )
|
||||||
{
|
{
|
||||||
|
case MENU_BUTTON_START:
|
||||||
case MENU_BUTTON_LEFT:
|
case MENU_BUTTON_LEFT:
|
||||||
case MENU_BUTTON_RIGHT:
|
case MENU_BUTTON_RIGHT:
|
||||||
if( !m_In.IsTransitioning() && !m_Out.IsTransitioning() )
|
SCREENMAN->SendMessageToTopScreen( SM_NotesEnded, 0 );
|
||||||
m_Out.StartTransitioning( SM_GoToNextScreen );
|
|
||||||
break;
|
|
||||||
case MENU_BUTTON_COIN:
|
|
||||||
Screen::MenuCoin( MenuI.player ); // increment coins, play sound
|
|
||||||
m_soundMusic.Stop();
|
|
||||||
SDL_Delay( 800 ); // do a little pause, like the arcade does
|
|
||||||
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
|
|
||||||
break;
|
|
||||||
case MENU_BUTTON_START:
|
|
||||||
case MENU_BUTTON_BACK:
|
|
||||||
|
|
||||||
switch( PREFSMAN->m_CoinMode )
|
|
||||||
{
|
|
||||||
case PrefsManager::COIN_PAY:
|
|
||||||
if( GAMESTATE->m_iCoins < PREFSMAN->m_iCoinsPerCredit )
|
|
||||||
break; // don't fall through
|
|
||||||
// fall through
|
|
||||||
case PrefsManager::COIN_FREE:
|
|
||||||
case PrefsManager::COIN_HOME:
|
|
||||||
m_soundMusic.Stop();
|
|
||||||
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","insert coin") );
|
|
||||||
SDL_Delay( 800 ); // do a little pause, like the arcade does
|
|
||||||
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ASSERT(0);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenJukebox::HandleScreenMessage( const ScreenMessage SM )
|
void ScreenJukebox::HandleScreenMessage( const ScreenMessage SM )
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ ScreenJukeboxMenu::ScreenJukeboxMenu()
|
|||||||
// m_Selector.AllowNewNotes();
|
// m_Selector.AllowNewNotes();
|
||||||
this->AddChild( &m_Selector );
|
this->AddChild( &m_Selector );
|
||||||
|
|
||||||
m_Menu.Load( "ScreenJukeboxMenu" );
|
m_Menu.Load( "ScreenJukeboxMenu", false ); // disable timer
|
||||||
this->AddChild( &m_Menu );
|
this->AddChild( &m_Menu );
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ ScreenMusicScroll::ScreenMusicScroll()
|
|||||||
|
|
||||||
GAMESTATE->Reset(); // so that credits message for both players will show
|
GAMESTATE->Reset(); // so that credits message for both players will show
|
||||||
|
|
||||||
m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations","music scroll") );
|
m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations","ScreenMusicScroll background") );
|
||||||
this->AddChild( &m_Background );
|
this->AddChild( &m_Background );
|
||||||
|
|
||||||
|
|
||||||
@@ -187,13 +187,16 @@ ScreenMusicScroll::ScreenMusicScroll()
|
|||||||
|
|
||||||
this->SendScreenMessage( SM_BeginFadingOut, 0.2f * i + 3.0f );
|
this->SendScreenMessage( SM_BeginFadingOut, 0.2f * i + 3.0f );
|
||||||
|
|
||||||
this->AddChild( &m_Fade );
|
m_In.Load( THEME->GetPathTo("BGAnimations","ScreenMusicScroll in") );
|
||||||
|
// this->AddChild( &m_In ); // draw and update manually
|
||||||
|
m_In.StartTransitioning();
|
||||||
|
|
||||||
|
m_Out.Load( THEME->GetPathTo("BGAnimations","ScreenMusicScroll out") );
|
||||||
|
// this->AddChild( &m_Out ); // draw and update manually
|
||||||
|
|
||||||
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("music scroll") );
|
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("music scroll") );
|
||||||
|
|
||||||
SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenMusicScroll music") );
|
SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenMusicScroll music") );
|
||||||
|
|
||||||
m_Fade.OpenWipingRight();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -203,6 +206,9 @@ void ScreenMusicScroll::Update( float fDeltaTime )
|
|||||||
|
|
||||||
for( unsigned i=0; i<m_iNumLines; i++ )
|
for( unsigned i=0; i<m_iNumLines; i++ )
|
||||||
m_textLines[i].Update( fDeltaTime );
|
m_textLines[i].Update( fDeltaTime );
|
||||||
|
|
||||||
|
m_In.Update( fDeltaTime );
|
||||||
|
m_Out.Update( fDeltaTime );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -217,15 +223,16 @@ void ScreenMusicScroll::DrawPrimitives()
|
|||||||
m_textLines[i].Draw();
|
m_textLines[i].Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_Fade.Draw(); // render it again so it shows over the text
|
m_In.Draw(); // render it again so it shows over the text
|
||||||
|
m_Out.Draw(); // render it again so it shows over the text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ScreenMusicScroll::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
void ScreenMusicScroll::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScreenMusicScroll::Input()" );
|
// LOG->Trace( "ScreenMusicScroll::Input()" );
|
||||||
|
|
||||||
if( m_Fade.IsClosing() )
|
if( m_In.IsTransitioning() || m_Out.IsTransitioning() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler
|
Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler
|
||||||
@@ -236,7 +243,8 @@ void ScreenMusicScroll::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
switch( SM )
|
switch( SM )
|
||||||
{
|
{
|
||||||
case SM_BeginFadingOut:
|
case SM_BeginFadingOut:
|
||||||
m_Fade.CloseWipingRight( SM_GoToNextScreen );
|
if( !m_Out.IsTransitioning() )
|
||||||
|
m_Out.StartTransitioning( SM_GoToNextScreen );
|
||||||
break;
|
break;
|
||||||
case SM_GoToNextScreen:
|
case SM_GoToNextScreen:
|
||||||
SONGMAN->SaveMachineScoresToDisk();
|
SONGMAN->SaveMachineScoresToDisk();
|
||||||
@@ -247,11 +255,11 @@ void ScreenMusicScroll::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
|
|
||||||
void ScreenMusicScroll::MenuStart( PlayerNumber pn )
|
void ScreenMusicScroll::MenuStart( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
m_Fade.CloseWipingRight( SM_GoToNextScreen );
|
this->SendScreenMessage( SM_BeginFadingOut, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenMusicScroll::MenuBack( PlayerNumber pn )
|
void ScreenMusicScroll::MenuBack( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
MenuStart( pn );
|
this->SendScreenMessage( SM_BeginFadingOut, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "Screen.h"
|
#include "Screen.h"
|
||||||
#include "Sprite.h"
|
#include "Sprite.h"
|
||||||
#include "TransitionFade.h"
|
#include "TransitionBGAnimation.h"
|
||||||
#include "RageSoundManager.h"
|
#include "RageSoundManager.h"
|
||||||
#include "MenuElements.h"
|
#include "MenuElements.h"
|
||||||
|
|
||||||
@@ -37,12 +37,13 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
BGAnimation m_Background;
|
BGAnimation m_Background;
|
||||||
BitmapText m_textLines[MAX_TOTAL_LINES];
|
BitmapText m_textLines[MAX_TOTAL_LINES];
|
||||||
unsigned m_iNumLines;
|
unsigned m_iNumLines;
|
||||||
float m_fTimeLeftInScreen;
|
float m_fTimeLeftInScreen;
|
||||||
|
|
||||||
TransitionFade m_Fade;
|
TransitionBGAnimation m_In;
|
||||||
|
TransitionBGAnimation m_Out;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user