Add Screen::HandleScreenMessage, to handle common screen
messages. (Most screens don't call this base function right now.)
This commit is contained in:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user