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 "RageSounds.h"
|
||||||
#include "ProfileManager.h"
|
#include "ProfileManager.h"
|
||||||
|
|
||||||
|
#define NEXT_SCREEN THEME->GetMetric (m_sName,"NextScreen")
|
||||||
|
#define PREV_SCREEN THEME->GetMetric (m_sName,"PrevScreen")
|
||||||
|
|
||||||
Screen::Screen( CString sName )
|
Screen::Screen( CString sName )
|
||||||
{
|
{
|
||||||
SetName( 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 )
|
bool Screen::ChangeCoinModeInput( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
||||||
{
|
{
|
||||||
if( type != IET_FIRST_PRESS )
|
if( type != IET_FIRST_PRESS )
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public:
|
|||||||
|
|
||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDeltaTime );
|
||||||
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
||||||
virtual void HandleScreenMessage( const ScreenMessage SM ) {};
|
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||||
|
|
||||||
void PostScreenMessage( const ScreenMessage SM, const float fDelay );
|
void PostScreenMessage( const ScreenMessage SM, const float fDelay );
|
||||||
void ClearMessageQueue();
|
void ClearMessageQueue();
|
||||||
|
|||||||
Reference in New Issue
Block a user