Fix OptionsMessage showing in the editor

This commit is contained in:
Glenn Maynard
2003-09-30 05:25:22 +00:00
parent 0eb9b75928
commit 56528ecbeb
2 changed files with 22 additions and 15 deletions
+21 -15
View File
@@ -26,20 +26,25 @@ ScreenPlayerOptions::ScreenPlayerOptions( CString sClassName ) :
ScreenOptionsMaster( sClassName )
{
LOG->Trace( "ScreenPlayerOptions::ScreenPlayerOptions()" );
m_bAskOptionsMessage =
!GAMESTATE->m_bEditing && PREFSMAN->m_ShowSongOptions == PrefsManager::ASK;
/* If we're going to "press start for more options" or skipping options
* entirely, we need a different fade out. XXX: this is a hack */
if(PREFSMAN->m_ShowSongOptions == PrefsManager::NO)
if( PREFSMAN->m_ShowSongOptions == PrefsManager::NO || GAMESTATE->m_bEditing )
m_Menu.m_Out.Load( THEME->GetPathToB("ScreenPlayerOptions direct out") ); /* direct to stage */
else if(PREFSMAN->m_ShowSongOptions == PrefsManager::ASK)
else if( m_bAskOptionsMessage )
{
m_Menu.m_Out.Load( THEME->GetPathToB("ScreenPlayerOptions option out") ); /* optional song options */
m_sprOptionsMessage.Load( THEME->GetPathToG("ScreenPlayerOptions options") );
m_sprOptionsMessage.StopAnimating();
m_sprOptionsMessage.SetXY( CENTER_X, CENTER_Y );
m_sprOptionsMessage.SetZoom( 1 );
m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,0) );
//this->AddChild( &m_sprOptionsMessage ); // we have to draw this manually over the top of transitions
m_sprOptionsMessage.Load( THEME->GetPathToG("ScreenPlayerOptions options") );
m_sprOptionsMessage.StopAnimating();
m_sprOptionsMessage.SetXY( CENTER_X, CENTER_Y );
m_sprOptionsMessage.SetZoom( 1 );
m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,0) );
//this->AddChild( &m_sprOptionsMessage ); // we have to draw this manually over the top of transitions
}
m_bAcceptedChoices = false;
m_bGoToOptions = ( PREFSMAN->m_ShowSongOptions == PrefsManager::YES );
@@ -75,24 +80,25 @@ void ScreenPlayerOptions::GoToNextState()
void ScreenPlayerOptions::Update( float fDelta )
{
ScreenOptionsMaster::Update( fDelta );
m_sprOptionsMessage.Update( fDelta );
if( m_bAskOptionsMessage )
m_sprOptionsMessage.Update( fDelta );
}
void ScreenPlayerOptions::DrawPrimitives()
{
ScreenOptionsMaster::DrawPrimitives();
m_sprOptionsMessage.Draw();
if( m_bAskOptionsMessage )
m_sprOptionsMessage.Draw();
}
void ScreenPlayerOptions::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
{
if( !GAMESTATE->m_bEditing &&
if( m_bAskOptionsMessage &&
type == IET_FIRST_PRESS &&
!m_Menu.m_In.IsTransitioning() &&
MenuI.IsValid() &&
MenuI.button == MENU_BUTTON_START &&
PREFSMAN->m_ShowSongOptions == PrefsManager::ASK )
MenuI.button == MENU_BUTTON_START )
{
if( m_bAcceptedChoices && !m_bGoToOptions )
{
@@ -107,7 +113,7 @@ void ScreenPlayerOptions::Input( const DeviceInput& DeviceI, const InputEventTyp
void ScreenPlayerOptions::HandleScreenMessage( const ScreenMessage SM )
{
if( PREFSMAN->m_ShowSongOptions == PrefsManager::ASK )
if( m_bAskOptionsMessage )
{
switch( SM )
{