From c7dfb9f2ecbd973e5d3f85ca1ed33a2a44c52e0b Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 14 Sep 2006 20:52:34 +0000 Subject: [PATCH] MenuInput -> MenuButton --- stepmania/src/InputEventPlus.h | 2 +- stepmania/src/Screen.cpp | 2 +- stepmania/src/ScreenAttract.cpp | 4 ++-- stepmania/src/ScreenCenterImage.cpp | 4 ++-- stepmania/src/ScreenEdit.cpp | 2 +- stepmania/src/ScreenEdit.h | 2 +- stepmania/src/ScreenEnding.cpp | 2 +- stepmania/src/ScreenEz2SelectMusic.cpp | 2 +- stepmania/src/ScreenJukebox.cpp | 2 +- stepmania/src/ScreenOptions.cpp | 2 +- stepmania/src/ScreenSelectMaster.h | 2 +- stepmania/src/ScreenSelectMusic.cpp | 14 +++++++------- stepmania/src/StepMania.cpp | 4 ++-- 13 files changed, 22 insertions(+), 22 deletions(-) diff --git a/stepmania/src/InputEventPlus.h b/stepmania/src/InputEventPlus.h index 7c55f553f7..d982ac3b58 100644 --- a/stepmania/src/InputEventPlus.h +++ b/stepmania/src/InputEventPlus.h @@ -14,7 +14,7 @@ public: DeviceInput DeviceI; InputEventType type; GameInput GameI; - MenuInput MenuI; + MenuButton MenuI; PlayerNumber pn; MultiPlayer mp; DeviceInputList InputList; diff --git a/stepmania/src/Screen.cpp b/stepmania/src/Screen.cpp index 5f090da467..ea6ede4e0a 100644 --- a/stepmania/src/Screen.cpp +++ b/stepmania/src/Screen.cpp @@ -191,7 +191,7 @@ void Screen::Input( const InputEventPlus &input ) } // default input handler used by most menus - switch( input.MenuI.button ) + switch( input.MenuI ) { case MENU_BUTTON_UP: this->MenuUp ( input ); return; case MENU_BUTTON_DOWN: this->MenuDown ( input ); return; diff --git a/stepmania/src/ScreenAttract.cpp b/stepmania/src/ScreenAttract.cpp index 20e37b63e0..2e256bdd50 100644 --- a/stepmania/src/ScreenAttract.cpp +++ b/stepmania/src/ScreenAttract.cpp @@ -49,7 +49,7 @@ void ScreenAttract::AttractInput( const InputEventPlus &input, ScreenWithMenuEle if( input.type != IET_FIRST_PRESS ) return; // don't care - switch( input.MenuI.button ) + switch( input.MenuI ) { case MENU_BUTTON_BACK: if( !(bool)BACK_GOES_TO_START_SCREEN ) @@ -87,7 +87,7 @@ void ScreenAttract::AttractInput( const InputEventPlus &input, ScreenWithMenuEle if( pScreen->IsTransitioning() ) return; - switch( input.MenuI.button ) + switch( input.MenuI ) { case MENU_BUTTON_LEFT: case MENU_BUTTON_RIGHT: diff --git a/stepmania/src/ScreenCenterImage.cpp b/stepmania/src/ScreenCenterImage.cpp index 2556515587..b6de6356db 100644 --- a/stepmania/src/ScreenCenterImage.cpp +++ b/stepmania/src/ScreenCenterImage.cpp @@ -61,7 +61,7 @@ void ScreenCenterImage::Input( const InputEventPlus &input ) return; } - switch( input.MenuI.button ) + switch( input.MenuI ) { case MENU_BUTTON_START: SCREENMAN->PlayStartSound(); @@ -80,7 +80,7 @@ void ScreenCenterImage::Input( const InputEventPlus &input ) bool bIncrease = false; Axis axis = NUM_AXES; - switch( input.MenuI.button ) + switch( input.MenuI ) { case MENU_BUTTON_UP: axis = AXIS_TRANS_Y; bIncrease = false; break; case MENU_BUTTON_DOWN: axis = AXIS_TRANS_Y; bIncrease = true; break; diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index fa6e653696..d706ce285f 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -1086,7 +1086,7 @@ void ScreenEdit::Input( const InputEventPlus &input ) EditButton EditB; if( !DeviceToEdit( input.DeviceI, EditB ) ) - MenuInputToEditButton( input.MenuI.button, EditB ); + MenuInputToEditButton( input.MenuI, EditB ); if( EditB == EDIT_BUTTON_REMOVE_NOTE ) diff --git a/stepmania/src/ScreenEdit.h b/stepmania/src/ScreenEdit.h index 6d71798d80..688dbcdab7 100644 --- a/stepmania/src/ScreenEdit.h +++ b/stepmania/src/ScreenEdit.h @@ -457,7 +457,7 @@ public: void InitEditMappings(); bool DeviceToEdit( const DeviceInput &DeviceI, EditButton &button ) const; - bool MenuInputToEditButton( const MenuInput &MenuI, EditButton &button ) const; + bool MenuInputToEditButton( MenuButton MenuI, EditButton &button ) const; bool EditToDevice( EditButton button, int iSlotNum, DeviceInput &DeviceI ) const; bool EditPressed( EditButton button, const DeviceInput &DeviceI ); bool EditIsBeingPressed( EditButton button ) const; diff --git a/stepmania/src/ScreenEnding.cpp b/stepmania/src/ScreenEnding.cpp index 80f2a42cfb..dccee64457 100644 --- a/stepmania/src/ScreenEnding.cpp +++ b/stepmania/src/ScreenEnding.cpp @@ -121,7 +121,7 @@ void ScreenEnding::Input( const InputEventPlus &input ) { if( !IsTransitioning() ) { - switch( input.MenuI.button ) + switch( input.MenuI ) { case MENU_BUTTON_START: SCREENMAN->PostMessageToTopScreen( SM_BeginFadingOut, 0 ); diff --git a/stepmania/src/ScreenEz2SelectMusic.cpp b/stepmania/src/ScreenEz2SelectMusic.cpp index 4acdd13c39..207451ab65 100644 --- a/stepmania/src/ScreenEz2SelectMusic.cpp +++ b/stepmania/src/ScreenEz2SelectMusic.cpp @@ -244,7 +244,7 @@ void ScreenEz2SelectMusic::Input( const InputEventPlus &input ) if( !input.GameI.IsValid() ) return; // don't care - if( m_bMadeChoice && !m_bGoToOptions && input.MenuI.button == MENU_BUTTON_START ) + if( m_bMadeChoice && !m_bGoToOptions && input.MenuI == MENU_BUTTON_START ) { SCREENMAN->PlayStartSound(); m_bGoToOptions = true; diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index 25bec5ceeb..8cac7fa946 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -255,7 +255,7 @@ void ScreenJukebox::Input( const InputEventPlus &input ) if( input.type != IET_FIRST_PRESS ) return; /* ignore */ - switch( input.MenuI.button ) + switch( input.MenuI ) { case MENU_BUTTON_LEFT: case MENU_BUTTON_RIGHT: diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index 4513fa3795..a5422402f8 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -497,7 +497,7 @@ void ScreenOptions::Input( const InputEventPlus &input ) if( input.type == IET_RELEASE ) { - switch( input.MenuI.button ) + switch( input.MenuI ) { case MENU_BUTTON_START: case MENU_BUTTON_SELECT: diff --git a/stepmania/src/ScreenSelectMaster.h b/stepmania/src/ScreenSelectMaster.h index a68a18f96b..31654b3964 100644 --- a/stepmania/src/ScreenSelectMaster.h +++ b/stepmania/src/ScreenSelectMaster.h @@ -101,7 +101,7 @@ protected: int m_iChoice[NUM_PLAYERS]; bool m_bChosen[NUM_PLAYERS]; - MenuInput m_TrackingRepeatingInput; + MenuButton m_TrackingRepeatingInput; }; diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index 6a8fbe6787..0742375e10 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -291,7 +291,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input ) // Check for "Press START again for options" button press if( m_bMadeChoice && - input.MenuI.button == MENU_BUTTON_START && + input.MenuI == MENU_BUTTON_START && input.type != IET_RELEASE && OPTIONS_MENU_AVAILABLE.GetValue() ) { @@ -325,7 +325,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input ) UpdateSelectButton(); - if( input.MenuI.button == MENU_BUTTON_SELECT ) + if( input.MenuI == MENU_BUTTON_SELECT ) { if( input.type == IET_FIRST_PRESS ) m_MusicWheel.Move( 0 ); @@ -337,7 +337,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input ) { if( input.type == IET_FIRST_PRESS ) { - switch( input.MenuI.button ) + switch( input.MenuI ) { case MENU_BUTTON_LEFT: ChangeDifficulty( pn, -1 ); @@ -356,7 +356,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input ) return; } - switch( input.MenuI.button ) + switch( input.MenuI ) { case MENU_BUTTON_RIGHT: case MENU_BUTTON_LEFT: @@ -387,7 +387,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input ) m_MusicWheel.Move( 0 ); if( input.type == IET_FIRST_PRESS ) { - switch( input.MenuI.button ) + switch( input.MenuI ) { case MENU_BUTTON_LEFT: m_MusicWheel.ChangeMusicUnlessLocked( -1 ); @@ -434,7 +434,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input ) // change to return if Start is part of a code because we don't want to process // Start as "move to the next screen" if it was just part of a code. // XXX: Why are we doing this here? Menu(Up|Down|Left|Right) don't do anything. -- Steve - switch( input.MenuI.button ) + switch( input.MenuI ) { case MENU_BUTTON_UP: this->MenuUp( input ); break; case MENU_BUTTON_DOWN: this->MenuDown( input ); break; @@ -496,7 +496,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input ) } } - switch( input.MenuI.button ) + switch( input.MenuI ) { case MENU_BUTTON_START: Screen::MenuStart( input ); break; } diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 7086931742..123d51c9d5 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -1264,7 +1264,7 @@ bool HandleGlobalInputs( const InputEventPlus &input ) if( input.type != IET_FIRST_PRESS ) return false; - switch( input.MenuI.button ) + switch( input.MenuI ) { case MENU_BUTTON_OPERATOR: @@ -1446,7 +1446,7 @@ void HandleInputEvents(float fDeltaTime) CodeDetector::EnteredCode(input.GameI.controller,CODE_BACK_IN_EVENT_MODE) ) { input.pn = PLAYER_1; - input.MenuI.button = MENU_BUTTON_BACK; + input.MenuI = MENU_BUTTON_BACK; } SCREENMAN->Input( input );