add OptionsList broadcasts for Left,Right,Start
This commit is contained in:
@@ -280,6 +280,10 @@ void OptionsList::Input( const InputEventPlus &input )
|
||||
--m_iMenuStackSelection;
|
||||
wrap( m_iMenuStackSelection, pHandler->m_Def.m_vsChoices.size()+1 ); // +1 for exit row
|
||||
PositionCursor();
|
||||
|
||||
Message msg("OptionsListLeft");
|
||||
msg.SetParam( "Player", input.pn );
|
||||
MESSAGEMAN->Broadcast( msg );
|
||||
}
|
||||
else if( input.MenuI == MENU_BUTTON_RIGHT )
|
||||
{
|
||||
@@ -294,11 +298,15 @@ void OptionsList::Input( const InputEventPlus &input )
|
||||
++m_iMenuStackSelection;
|
||||
wrap( m_iMenuStackSelection, pHandler->m_Def.m_vsChoices.size()+1 ); // +1 for exit row
|
||||
PositionCursor();
|
||||
|
||||
Message msg("OptionsListRight");
|
||||
msg.SetParam( "Player", input.pn );
|
||||
MESSAGEMAN->Broadcast( msg );
|
||||
}
|
||||
else if( input.MenuI == MENU_BUTTON_START )
|
||||
{
|
||||
LOG->Trace( "X5" );
|
||||
Start();
|
||||
LOG->Trace( "X5" );
|
||||
Start( input.pn );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -415,7 +423,7 @@ void OptionsList::Push( RString sDest )
|
||||
SwitchToCurrentRow();
|
||||
}
|
||||
|
||||
bool OptionsList::Start()
|
||||
bool OptionsList::Start( PlayerNumber pn )
|
||||
{
|
||||
const OptionRowHandler *pHandler = GetCurrentHandler();
|
||||
const RString &sCurrentRow = m_asMenuStack.back();
|
||||
@@ -463,6 +471,10 @@ bool OptionsList::Start()
|
||||
PositionCursor();
|
||||
}
|
||||
|
||||
Message msg("OptionsListStart");
|
||||
msg.SetParam( "Player", pn );
|
||||
MESSAGEMAN->Broadcast( msg );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,6 @@ public:
|
||||
|
||||
void PositionCursor( Actor *pCursor, int iSelection );
|
||||
|
||||
void Up();
|
||||
void Down();
|
||||
void Start();
|
||||
|
||||
private:
|
||||
@@ -49,7 +47,7 @@ public:
|
||||
void Input( const InputEventPlus &input );
|
||||
bool IsOpened() const { return m_asMenuStack.size() > 0; }
|
||||
|
||||
bool Start(); /* return true if the last menu was popped in response to this press */
|
||||
bool Start( PlayerNumber pn ); /* return true if the last menu was popped in response to this press */
|
||||
|
||||
private:
|
||||
void SwitchMenu( int iDir );
|
||||
|
||||
@@ -390,7 +390,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
||||
CloseOptionsList( pn );
|
||||
return;
|
||||
case GAME_BUTTON_START:
|
||||
if( m_OptionsList[pn].Start() )
|
||||
if( m_OptionsList[pn].Start(pn) )
|
||||
CloseOptionsList( pn );
|
||||
return;
|
||||
case GAME_BUTTON_MENULEFT:
|
||||
@@ -1194,7 +1194,7 @@ void ScreenSelectMusic::AfterMusicChange()
|
||||
void ScreenSelectMusic::OpenOptionsList( PlayerNumber pn )
|
||||
{
|
||||
m_OptionsList[pn].Open();
|
||||
Message msg("OptionsOpened");
|
||||
Message msg("OptionsListOpened");
|
||||
msg.SetParam( "Player", pn );
|
||||
MESSAGEMAN->Broadcast( msg );
|
||||
}
|
||||
@@ -1202,7 +1202,7 @@ void ScreenSelectMusic::OpenOptionsList( PlayerNumber pn )
|
||||
void ScreenSelectMusic::CloseOptionsList( PlayerNumber pn )
|
||||
{
|
||||
m_OptionsList[pn].Close();
|
||||
Message msg("OptionsClosed");
|
||||
Message msg("OptionsListClosed");
|
||||
msg.SetParam( "Player", pn );
|
||||
MESSAGEMAN->Broadcast( msg );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user