[MessageManager] Added MenuStartP1 and MenuStartP2 messages.

[ScreenSelectMaster] Broadcast MenuStartP# messages; allow themers to handle the MenuStartP# message on screenless items.
This commit is contained in:
AJ Kelly
2010-12-20 23:25:00 -06:00
parent ddf9fe5e41
commit e01fab250f
4 changed files with 20 additions and 1 deletions
+7
View File
@@ -13,6 +13,13 @@ _____________________________________________________________________________
sm-ssc v1.2 | 201012xx
--------------------------------------------------------------------------------
20101220
--------
* [Actor] Add bezier (_fallback/02 Actor.lua) [FSX]
* [MessageManager] Added MenuStartP1 and MenuStartP2 messages. [freem]
* [ScreenSelectMaster] Broadcast MenuStartP# messages; allow themers to handle
the MenuStartP# message on screenless items. [freem]
20101219
--------
* [WheelNotifyIcon] add BlinkPlayersBest metric. [freem]
+2
View File
@@ -52,6 +52,8 @@ static const char *MessageIDNames[] = {
"MenuLeftP2",
"MenuRightP1",
"MenuRightP2",
"MenuStartP1",
"MenuStartP2",
"MenuSelectionChanged",
"PlayerJoined",
"PlayerUnjoined",
+2
View File
@@ -49,6 +49,8 @@ enum MessageID
Message_MenuLeftP2,
Message_MenuRightP1,
Message_MenuRightP2,
Message_MenuStartP1,
Message_MenuStartP2,
Message_MenuSelectionChanged,
Message_PlayerJoined,
Message_PlayerUnjoined,
+9 -1
View File
@@ -785,7 +785,6 @@ void ScreenSelectMaster::MenuStart( const InputEventPlus &input )
return;
}
const GameCommand &mc = m_aGameCommands[m_iChoice[pn]];
/* If no options are playable, then we're just waiting for one to become available.
@@ -802,6 +801,11 @@ void ScreenSelectMaster::MenuStart( const InputEventPlus &input )
if( mc.m_sScreen.empty() )
{
mc.ApplyToAllPlayers();
// We want to be able to broadcast a Start message to the theme, in
// case a themer wants to handle something. -aj
// TODO: Find a way to differentiate this from the message below, for
// less ambiguousness?
MESSAGEMAN->Broadcast( (MessageID)(Message_MenuStartP1+pn) );
return;
}
@@ -825,7 +829,11 @@ void ScreenSelectMaster::MenuStart( const InputEventPlus &input )
}
if( bAllDone )
{
// broadcast MenuStart just like MenuLeft/Right/etc.
MESSAGEMAN->Broadcast( (MessageID)(Message_MenuStartP1+pn) );
this->PostScreenMessage( SM_BeginFadingOut, fSecs );// tell our owner it's time to move on
}
}
/* We want all items to always run OnCommand and either GainFocus or LoseFocus