From 6bf3c9ed37edf0bb6a054417d1f0e0652b409212 Mon Sep 17 00:00:00 2001 From: Colby Klein Date: Fri, 28 Dec 2012 17:49:53 -0800 Subject: [PATCH] Fix mouse events being eaten on SSMusic. --- src/ScreenSelectMusic.cpp | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/src/ScreenSelectMusic.cpp b/src/ScreenSelectMusic.cpp index 7c594519a6..7205408c8a 100644 --- a/src/ScreenSelectMusic.cpp +++ b/src/ScreenSelectMusic.cpp @@ -394,6 +394,18 @@ void ScreenSelectMusic::Update( float fDeltaTime ) } void ScreenSelectMusic::Input( const InputEventPlus &input ) { + // HACK: This screen eats mouse inputs if we don't check for them first. + bool mouse_evt = false; + for (int i = MOUSE_LEFT; i <= MOUSE_WHEELDOWN; i++) + { + if (input.DeviceI == DeviceInput( DEVICE_MOUSE, (DeviceButton)i )) + mouse_evt = true; + } + if (mouse_evt) + { + ScreenWithMenuElements::Input(input); + return; + } // LOG->Trace( "ScreenSelectMusic::Input()" ); // reset announcer timer @@ -505,23 +517,6 @@ void ScreenSelectMusic::Input( const InputEventPlus &input ) m_bStepsChosen[input.pn] ) return; // ignore - // todo: Allow mousewheel to scroll MusicWheel -aj - /* - if( input.DeviceI.device == DEVICE_MOUSE ) - { - if( input.DeviceI.button == MOUSE_WHEELUP ) - { - MESSAGEMAN->Broadcast( "PreviousSong" ); - m_MusicWheel.Move( -1 ); - } - else if( input.DeviceI.button == MOUSE_WHEELDOWN ) - { - MESSAGEMAN->Broadcast( "NextSong" ); - m_MusicWheel.Move( +1 ); - } - } - */ - if( USE_PLAYER_SELECT_MENU ) { if( input.type == IET_RELEASE && input.MenuI == GAME_BUTTON_SELECT )