make SM_MenuTimer close all open OptionsLists
This commit is contained in:
@@ -331,21 +331,11 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
|||||||
switch( input.MenuI )
|
switch( input.MenuI )
|
||||||
{
|
{
|
||||||
case GAME_BUTTON_SELECT:
|
case GAME_BUTTON_SELECT:
|
||||||
{
|
CloseOptionsList( pn );
|
||||||
Message msg("OptionsClosed");
|
|
||||||
msg.SetParam( "Player", pn );
|
|
||||||
MESSAGEMAN->Broadcast( msg );
|
|
||||||
m_OptionsList[pn].Close();
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
case GAME_BUTTON_START:
|
case GAME_BUTTON_START:
|
||||||
if( m_OptionsList[pn].Start() )
|
if( m_OptionsList[pn].Start() )
|
||||||
{
|
CloseOptionsList( pn );
|
||||||
Message msg("OptionsClosed");
|
|
||||||
msg.SetParam( "Player", pn );
|
|
||||||
MESSAGEMAN->Broadcast( msg );
|
|
||||||
m_OptionsList[pn].Close();
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
case GAME_BUTTON_MENULEFT:
|
case GAME_BUTTON_MENULEFT:
|
||||||
case GAME_BUTTON_MENURIGHT:
|
case GAME_BUTTON_MENURIGHT:
|
||||||
@@ -358,10 +348,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
|||||||
{
|
{
|
||||||
if( input.type == IET_FIRST_PRESS && input.MenuI == GAME_BUTTON_SELECT )
|
if( input.type == IET_FIRST_PRESS && input.MenuI == GAME_BUTTON_SELECT )
|
||||||
{
|
{
|
||||||
Message msg("OptionsOpened");
|
OpenOptionsList( pn );
|
||||||
msg.SetParam( "Player", pn );
|
|
||||||
MESSAGEMAN->Broadcast( msg );
|
|
||||||
m_OptionsList[pn].Open();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -670,20 +657,13 @@ void ScreenSelectMusic::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
m_MenuTimer->SetSeconds( 15 );
|
m_MenuTimer->SetSeconds( 15 );
|
||||||
m_MenuTimer->Start();
|
m_MenuTimer->Start();
|
||||||
}
|
}
|
||||||
else if( DO_ROULETTE_ON_MENU_TIMER )
|
else if( DO_ROULETTE_ON_MENU_TIMER && m_MusicWheel.GetSelectedSong() == NULL && m_MusicWheel.GetSelectedCourse() == NULL )
|
||||||
{
|
|
||||||
if( m_MusicWheel.GetSelectedSong() == NULL && m_MusicWheel.GetSelectedCourse() == NULL )
|
|
||||||
{
|
{
|
||||||
m_MusicWheel.StartRoulette();
|
m_MusicWheel.StartRoulette();
|
||||||
m_MenuTimer->SetSeconds( 15 );
|
m_MenuTimer->SetSeconds( 15 );
|
||||||
m_MenuTimer->Start();
|
m_MenuTimer->Start();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
MenuStart( InputEventPlus() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
// Finish sort changing so that the wheel can respond immediately to our
|
// Finish sort changing so that the wheel can respond immediately to our
|
||||||
// request to choose random.
|
// request to choose random.
|
||||||
@@ -691,6 +671,10 @@ void ScreenSelectMusic::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
if( m_MusicWheel.GetSelectedSong() == NULL && m_MusicWheel.GetSelectedCourse() == NULL )
|
if( m_MusicWheel.GetSelectedSong() == NULL && m_MusicWheel.GetSelectedCourse() == NULL )
|
||||||
m_MusicWheel.StartRandom();
|
m_MusicWheel.StartRandom();
|
||||||
|
|
||||||
|
FOREACH_ENUM( PlayerNumber, p )
|
||||||
|
if( m_OptionsList[p].IsOpened() )
|
||||||
|
CloseOptionsList(p);
|
||||||
|
|
||||||
MenuStart( InputEventPlus() );
|
MenuStart( InputEventPlus() );
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -1165,6 +1149,22 @@ void ScreenSelectMusic::AfterMusicChange()
|
|||||||
AfterStepsOrTrailChange( vpns );
|
AfterStepsOrTrailChange( vpns );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScreenSelectMusic::OpenOptionsList( PlayerNumber pn )
|
||||||
|
{
|
||||||
|
m_OptionsList[pn].Open();
|
||||||
|
Message msg("OptionsOpened");
|
||||||
|
msg.SetParam( "Player", pn );
|
||||||
|
MESSAGEMAN->Broadcast( msg );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenSelectMusic::CloseOptionsList( PlayerNumber pn )
|
||||||
|
{
|
||||||
|
m_OptionsList[pn].Close();
|
||||||
|
Message msg("OptionsClosed");
|
||||||
|
msg.SetParam( "Player", pn );
|
||||||
|
MESSAGEMAN->Broadcast( msg );
|
||||||
|
}
|
||||||
|
|
||||||
// lua start
|
// lua start
|
||||||
#include "LuaBinding.h"
|
#include "LuaBinding.h"
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,8 @@ protected:
|
|||||||
BitmapText m_textHighScore[NUM_PLAYERS];
|
BitmapText m_textHighScore[NUM_PLAYERS];
|
||||||
MusicWheel m_MusicWheel;
|
MusicWheel m_MusicWheel;
|
||||||
OptionsList m_OptionsList[NUM_PLAYERS];
|
OptionsList m_OptionsList[NUM_PLAYERS];
|
||||||
|
void OpenOptionsList( PlayerNumber pn );
|
||||||
|
void CloseOptionsList( PlayerNumber pn );
|
||||||
|
|
||||||
SelectionState m_SelectionState;
|
SelectionState m_SelectionState;
|
||||||
bool m_bGoToOptions;
|
bool m_bGoToOptions;
|
||||||
|
|||||||
Reference in New Issue
Block a user