add messages on movement in menus

This commit is contained in:
Chris Danford
2005-05-02 21:33:02 +00:00
parent 52eb929538
commit 4169ecfa61
3 changed files with 28 additions and 0 deletions
+8
View File
@@ -28,6 +28,14 @@ static const CString MessageNames[NUM_MESSAGES] = {
"CardRemovedP1",
"CardRemovedP2",
"BeatCrossed",
"MenuUpP1",
"MenuUpP2",
"MenuDownP1",
"MenuDownP2",
"MenuLeftP1",
"MenuLeftP2",
"MenuRightP1",
"MenuRightP2",
};
XToString( Message, NUM_MESSAGES );
+8
View File
@@ -35,6 +35,14 @@ enum Message
MESSAGE_CARD_REMOVED_P1,
MESSAGE_CARD_REMOVED_P2,
MESSAGE_BEAT_CROSSED,
MENU_UP_P1,
MENU_UP_P2,
MENU_DOWN_P1,
MENU_DOWN_P2,
MENU_LEFT_P1,
MENU_LEFT_P2,
MENU_RIGHT_P1,
MENU_RIGHT_P2,
NUM_MESSAGES,
MESSAGE_INVALID
};
+12
View File
@@ -401,7 +401,10 @@ void ScreenSelectMaster::MenuLeft( PlayerNumber pn, const InputEventType type )
if( !ALLOW_REPEATING_INPUT && type != IET_FIRST_PRESS )
return;
if( Move(pn, MENU_DIR_LEFT) )
{
m_soundChange.Play();
MESSAGEMAN->Broadcast( (Message)(MENU_LEFT_P1+pn) );
}
}
void ScreenSelectMaster::MenuRight( PlayerNumber pn, const InputEventType type )
@@ -413,7 +416,10 @@ void ScreenSelectMaster::MenuRight( PlayerNumber pn, const InputEventType type )
if( !ALLOW_REPEATING_INPUT && type != IET_FIRST_PRESS )
return;
if( Move(pn, MENU_DIR_RIGHT) )
{
m_soundChange.Play();
MESSAGEMAN->Broadcast( (Message)(MENU_RIGHT_P1+pn) );
}
}
void ScreenSelectMaster::MenuUp( PlayerNumber pn, const InputEventType type )
@@ -425,7 +431,10 @@ void ScreenSelectMaster::MenuUp( PlayerNumber pn, const InputEventType type )
if( !ALLOW_REPEATING_INPUT && type != IET_FIRST_PRESS )
return;
if( Move(pn, MENU_DIR_UP) )
{
m_soundChange.Play();
MESSAGEMAN->Broadcast( (Message)(MENU_UP_P1+pn) );
}
}
void ScreenSelectMaster::MenuDown( PlayerNumber pn, const InputEventType type )
@@ -437,7 +446,10 @@ void ScreenSelectMaster::MenuDown( PlayerNumber pn, const InputEventType type )
if( !ALLOW_REPEATING_INPUT && type != IET_FIRST_PRESS )
return;
if( Move(pn, MENU_DIR_DOWN) )
{
m_soundChange.Play();
MESSAGEMAN->Broadcast( (Message)(MENU_DOWN_P1+pn) );
}
}
bool ScreenSelectMaster::ChangePage( int iNewChoice )