InputEventPlus

This commit is contained in:
Glenn Maynard
2006-09-14 21:25:06 +00:00
parent 3f96734e6c
commit c8749f500d
6 changed files with 25 additions and 25 deletions
+6 -6
View File
@@ -61,21 +61,21 @@ void ScreenBookkeeping::Input( const InputEventPlus &input )
Screen::Input( input ); // default handler Screen::Input( input ); // default handler
} }
void ScreenBookkeeping::MenuLeft( PlayerNumber pn ) void ScreenBookkeeping::MenuLeft( const InputEventPlus &input )
{ {
m_View = (View)(m_View-1); m_View = (View)(m_View-1);
CLAMP( (int&)m_View, 0, NUM_VIEWS-1 ); CLAMP( (int&)m_View, 0, NUM_VIEWS-1 );
ChangeView( m_View ); ChangeView( m_View );
} }
void ScreenBookkeeping::MenuRight( PlayerNumber pn ) void ScreenBookkeeping::MenuRight( const InputEventPlus &input )
{ {
m_View = (View)(m_View+1); m_View = (View)(m_View+1);
CLAMP( (int&)m_View, 0, NUM_VIEWS-1 ); CLAMP( (int&)m_View, 0, NUM_VIEWS-1 );
ChangeView( m_View ); ChangeView( m_View );
} }
void ScreenBookkeeping::MenuStart( PlayerNumber pn ) void ScreenBookkeeping::MenuStart( const InputEventPlus &input )
{ {
if( !IsTransitioning() ) if( !IsTransitioning() )
{ {
@@ -84,7 +84,7 @@ void ScreenBookkeeping::MenuStart( PlayerNumber pn )
} }
} }
void ScreenBookkeeping::MenuBack( PlayerNumber pn ) void ScreenBookkeeping::MenuBack( const InputEventPlus &input )
{ {
if(!IsTransitioning()) if(!IsTransitioning())
{ {
@@ -93,11 +93,11 @@ void ScreenBookkeeping::MenuBack( PlayerNumber pn )
} }
} }
void ScreenBookkeeping::MenuCoin( PlayerNumber pn ) void ScreenBookkeeping::MenuCoin( const InputEventPlus &input )
{ {
ChangeView( m_View ); ChangeView( m_View );
Screen::MenuCoin( pn ); Screen::MenuCoin( input );
} }
static LocalizedString ALL_TIME ( "ScreenBookkeeping", "All-time Total:" ); static LocalizedString ALL_TIME ( "ScreenBookkeeping", "All-time Total:" );
+5 -5
View File
@@ -17,11 +17,11 @@ public:
virtual void Update( float fDelta ); virtual void Update( float fDelta );
virtual void Input( const InputEventPlus &input ); virtual void Input( const InputEventPlus &input );
virtual void MenuLeft( PlayerNumber pn ); virtual void MenuLeft( const InputEventPlus &input );
virtual void MenuRight( PlayerNumber pn ); virtual void MenuRight( const InputEventPlus &input );
virtual void MenuStart( PlayerNumber pn ); virtual void MenuStart( const InputEventPlus &input );
virtual void MenuBack( PlayerNumber pn ); virtual void MenuBack( const InputEventPlus &input );
void MenuCoin( PlayerNumber pn ); virtual void MenuCoin( const InputEventPlus &input );
private: private:
enum View { VIEW_LAST_DAYS, VIEW_LAST_WEEKS, VIEW_DAY_OF_WEEK, VIEW_HOUR_OF_DAY, NUM_VIEWS }; enum View { VIEW_LAST_DAYS, VIEW_LAST_WEEKS, VIEW_DAY_OF_WEEK, VIEW_HOUR_OF_DAY, NUM_VIEWS };
+6 -6
View File
@@ -213,7 +213,7 @@ void ScreenNetRoom::TweenOffScreen()
NSMAN->ReportNSSOnOff(6); NSMAN->ReportNSSOnOff(6);
} }
void ScreenNetRoom::MenuStart( PlayerNumber pn ) void ScreenNetRoom::MenuStart( const InputEventPlus &input )
{ {
m_RoomWheel.Select(); m_RoomWheel.Select();
RoomWheelData* rwd = (RoomWheelData*)m_RoomWheel.LastSelected(); RoomWheelData* rwd = (RoomWheelData*)m_RoomWheel.LastSelected();
@@ -233,16 +233,16 @@ void ScreenNetRoom::MenuStart( PlayerNumber pn )
NSMAN->SendSMOnline( ); NSMAN->SendSMOnline( );
} }
} }
ScreenNetSelectBase::MenuStart( pn ); ScreenNetSelectBase::MenuStart( input );
} }
void ScreenNetRoom::MenuBack( PlayerNumber pn ) void ScreenNetRoom::MenuBack( const InputEventPlus &input )
{ {
TweenOffScreen(); TweenOffScreen();
Cancel( SM_GoToPrevScreen ); Cancel( SM_GoToPrevScreen );
ScreenNetSelectBase::MenuBack( pn ); ScreenNetSelectBase::MenuBack( input );
} }
void ScreenNetRoom::MenuLeft( const InputEventPlus &input ) void ScreenNetRoom::MenuLeft( const InputEventPlus &input )
@@ -250,7 +250,7 @@ void ScreenNetRoom::MenuLeft( const InputEventPlus &input )
if( input.type == IET_FIRST_PRESS ) if( input.type == IET_FIRST_PRESS )
m_RoomWheel.Move(-1); m_RoomWheel.Move(-1);
ScreenNetSelectBase::MenuLeft( input.pn ); ScreenNetSelectBase::MenuLeft( input );
} }
void ScreenNetRoom::MenuRight( const InputEventPlus &input ) void ScreenNetRoom::MenuRight( const InputEventPlus &input )
@@ -258,7 +258,7 @@ void ScreenNetRoom::MenuRight( const InputEventPlus &input )
if( input.type == IET_FIRST_PRESS ) if( input.type == IET_FIRST_PRESS )
m_RoomWheel.Move(1); m_RoomWheel.Move(1);
ScreenNetSelectBase::MenuRight( input.pn ); ScreenNetSelectBase::MenuRight( input );
} }
void ScreenNetRoom::UpdateRoomsList() void ScreenNetRoom::UpdateRoomsList()
+2 -2
View File
@@ -34,8 +34,8 @@ public:
virtual void HandleScreenMessage( const ScreenMessage SM ); virtual void HandleScreenMessage( const ScreenMessage SM );
protected: protected:
virtual void MenuStart( PlayerNumber pn ); virtual void MenuStart( const InputEventPlus &input );
virtual void MenuBack( PlayerNumber pn ); virtual void MenuBack( const InputEventPlus &input );
virtual void TweenOffScreen( ); virtual void TweenOffScreen( );
+4 -4
View File
@@ -153,7 +153,7 @@ void ScreenPackages::Update( float fDeltaTime )
} }
static LocalizedString ENTER_URL ("ScreenPackages","Enter URL"); static LocalizedString ENTER_URL ("ScreenPackages","Enter URL");
void ScreenPackages::MenuStart( PlayerNumber pn ) void ScreenPackages::MenuStart( const InputEventPlus &input )
{ {
if ( m_iDLorLST == 1 ) if ( m_iDLorLST == 1 )
{ {
@@ -162,7 +162,7 @@ void ScreenPackages::MenuStart( PlayerNumber pn )
else else
EnterURL( m_Links[m_iLinksPos] ); EnterURL( m_Links[m_iLinksPos] );
} }
ScreenWithMenuElements::MenuStart( pn ); ScreenWithMenuElements::MenuStart( input );
} }
void ScreenPackages::MenuUp( const InputEventPlus &input ) void ScreenPackages::MenuUp( const InputEventPlus &input )
@@ -248,7 +248,7 @@ void ScreenPackages::MenuRight( const InputEventPlus &input )
} }
static LocalizedString DOWNLOAD_CANCELLED( "ScreenPackages", "Download cancelled." ); static LocalizedString DOWNLOAD_CANCELLED( "ScreenPackages", "Download cancelled." );
void ScreenPackages::MenuBack( PlayerNumber pn ) void ScreenPackages::MenuBack( const InputEventPlus &input )
{ {
if ( m_bIsDownloading ) if ( m_bIsDownloading )
{ {
@@ -259,7 +259,7 @@ void ScreenPackages::MenuBack( PlayerNumber pn )
TweenOffScreen(); TweenOffScreen();
Cancel( SM_GoToPrevScreen ); Cancel( SM_GoToPrevScreen );
ScreenWithMenuElements::MenuBack( pn ); ScreenWithMenuElements::MenuBack( input );
} }
void ScreenPackages::TweenOffScreen( ) void ScreenPackages::TweenOffScreen( )
+2 -2
View File
@@ -16,12 +16,12 @@ public:
virtual void HandleScreenMessage( const ScreenMessage SM ); virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuStart( PlayerNumber pn ); virtual void MenuStart( const InputEventPlus &input );
virtual void MenuUp( const InputEventPlus &input ); virtual void MenuUp( const InputEventPlus &input );
virtual void MenuDown( const InputEventPlus &input ); virtual void MenuDown( const InputEventPlus &input );
virtual void MenuLeft( const InputEventPlus &input ); virtual void MenuLeft( const InputEventPlus &input );
virtual void MenuRight( const InputEventPlus &input ); virtual void MenuRight( const InputEventPlus &input );
virtual void MenuBack( PlayerNumber pn ); virtual void MenuBack( const InputEventPlus &input );
virtual void TweenOffScreen( ); virtual void TweenOffScreen( );
virtual void Update(float f); virtual void Update(float f);