Fix mouse events being eaten on SSMusic.

This commit is contained in:
Colby Klein
2012-12-28 17:49:53 -08:00
parent 96af1ec186
commit 6bf3c9ed37
+12 -17
View File
@@ -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 )