Add Screen::HandleScreenMessage, to handle common screen

messages.  (Most screens don't call this base function right now.)
This commit is contained in:
Glenn Maynard
2004-05-08 06:18:06 +00:00
parent d8e2a64889
commit 5cebceafcf
2 changed files with 21 additions and 1 deletions
+20
View File
@@ -20,6 +20,9 @@
#include "RageSounds.h"
#include "ProfileManager.h"
#define NEXT_SCREEN THEME->GetMetric (m_sName,"NextScreen")
#define PREV_SCREEN THEME->GetMetric (m_sName,"PrevScreen")
Screen::Screen( CString sName )
{
SetName( sName );
@@ -145,6 +148,23 @@ void Screen::Input( const DeviceInput& DeviceI, const InputEventType type, const
}
}
void Screen::HandleScreenMessage( const ScreenMessage SM )
{
switch( SM )
{
case SM_MenuTimer:
FOREACH_HumanPlayer(p)
MenuStart( p );
break;
case SM_GoToNextScreen:
SCREENMAN->SetNewScreen( NEXT_SCREEN );
break;
case SM_GoToPrevScreen:
SCREENMAN->SetNewScreen( PREV_SCREEN );
break;
}
}
bool Screen::ChangeCoinModeInput( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
{
if( type != IET_FIRST_PRESS )