fix "holding left and pressing right ignores wheel lock"
This commit is contained in:
@@ -809,10 +809,10 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
||||
switch( input.MenuI.button )
|
||||
{
|
||||
case MENU_BUTTON_LEFT:
|
||||
m_MusicWheel.ChangeMusic( -1 );
|
||||
m_MusicWheel.ChangeMusicUnlessLocked( -1 );
|
||||
break;
|
||||
case MENU_BUTTON_RIGHT:
|
||||
m_MusicWheel.ChangeMusic( +1 );
|
||||
m_MusicWheel.ChangeMusicUnlessLocked( +1 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -495,6 +495,22 @@ void WheelBase::TweenOffScreenUpdateItems(bool changing_sort)
|
||||
}
|
||||
}
|
||||
|
||||
void WheelBase::ChangeMusicUnlessLocked( int n )
|
||||
{
|
||||
if( m_WheelState == STATE_LOCKED )
|
||||
{
|
||||
if(n)
|
||||
{
|
||||
int iSign = n/abs(n);
|
||||
m_fLockedWheelVelocity = iSign*LOCKED_INITIAL_VELOCITY;
|
||||
m_soundLocked.Play();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
ChangeMusic( n );
|
||||
}
|
||||
|
||||
void WheelBase::Move(int n)
|
||||
{
|
||||
if(n == m_Moving)
|
||||
|
||||
@@ -33,6 +33,7 @@ public:
|
||||
void TweenOffScreen() { TweenOffScreen(false); }
|
||||
|
||||
void Move(int n);
|
||||
void ChangeMusicUnlessLocked( int n ); /* +1 or -1 */
|
||||
virtual void ChangeMusic(int dist); /* +1 or -1 */
|
||||
|
||||
/* Return true if we're moving fast automatically. */
|
||||
|
||||
Reference in New Issue
Block a user