[ScreenSelectMusic] Fix an issue where Control+<Letter> wouldn't work.

This commit is contained in:
AJ Kelly
2012-07-10 01:39:02 -05:00
parent bffa610fb7
commit 6504580576
2 changed files with 1965 additions and 1958 deletions
+6 -2
View File
@@ -5,9 +5,13 @@ from StepMania 4 alpha 5 to sm-ssc v1.2.5, see Changelog_sm-ssc.txt.
________________________________________________________________________________
================================================================================
StepMania 5.0 ???? ?? | 20120???
StepMania 5.0 alpha 3 | 201207xx
--------------------------------------------------------------------------------
2012/07/10
----------
* [ScreenSelectMusic] Fix an issue where Control+<Letter> wouldn't work. [AJ]
2012/07/09
----------
* [InputMapper] Use "|" for separating entries instead of ",", since some
@@ -80,7 +84,7 @@ StepMania 5.0 ???? ?? | 20120???
2012/05/19
----------
* [Actor] Made the xy command a source-code level command.
* [Actor] Made the xy command a source-code level command. [AJ]
2012/05/17
----------
+36 -33
View File
@@ -411,6 +411,42 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
return;
}
if( !IsTransitioning() && m_SelectionState != SelectionState_Finalized )
{
bool bHoldingCtrl =
INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, KEY_LCTRL)) ||
INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, KEY_RCTRL));
wchar_t c = INPUTMAN->DeviceInputToChar(input.DeviceI,false);
MakeUpper( &c, 1 );
if( bHoldingCtrl && ( c >= 'A' ) && ( c <= 'Z' ) )
{
// Only allow changing the sort order if the wheel is not locked
// and we're not in course mode. -aj
if( !m_MusicWheel.WheelIsLocked() && !GAMESTATE->IsCourseMode() )
{
SortOrder so = GAMESTATE->m_SortOrder;
// When in Artist sort, this means first letter of the artist.
// Otherwise, if not in Title sort already, switch to Title sort.
if ( so != SORT_ARTIST )
so = SORT_TITLE;
GAMESTATE->m_PreferredSortOrder = so;
GAMESTATE->m_SortOrder.Set( so );
// Odd, changing the sort order requires us to call SetOpenSection more than once
m_MusicWheel.ChangeSort( so );
m_MusicWheel.SetOpenSection( ssprintf("%c", c ) );
m_MusicWheel.SelectSection( ssprintf("%c", c ) );
m_MusicWheel.ChangeSort( so );
m_MusicWheel.SetOpenSection( ssprintf("%c", c ) );
AfterMusicChange();
return;
}
}
}
if( !input.GameI.IsValid() )
return; // don't care
@@ -453,39 +489,6 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
if( IsTransitioning() )
return; // ignore
bool bHoldingCtrl =
INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, KEY_LCTRL)) ||
INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, KEY_RCTRL));
wchar_t c = INPUTMAN->DeviceInputToChar(input.DeviceI,false);
MakeUpper( &c, 1 );
if( bHoldingCtrl && ( c >= 'A' ) && ( c <= 'Z' ) )
{
// Only allow changing the sort order if the wheel is not locked
// and we're not in course mode. -aj
if( !m_MusicWheel.WheelIsLocked() && !GAMESTATE->IsCourseMode() )
{
SortOrder so = GAMESTATE->m_SortOrder;
// When in Artist sort, this means first letter of the artist.
// Otherwise, if not in Title sort already, switch to Title sort.
if ( so != SORT_ARTIST )
so = SORT_TITLE;
GAMESTATE->m_PreferredSortOrder = so;
GAMESTATE->m_SortOrder.Set( so );
// Odd, changing the sort order requires us to call SetOpenSection more than once
m_MusicWheel.ChangeSort( so );
m_MusicWheel.SetOpenSection( ssprintf("%c", c ) );
m_MusicWheel.SelectSection( ssprintf("%c", c ) );
m_MusicWheel.ChangeSort( so );
m_MusicWheel.SetOpenSection( ssprintf("%c", c ) );
AfterMusicChange();
return;
}
}
// Handle unselect steps
// xxx: select button could conflict with OptionsList here -aj
if( m_SelectionState == SelectionState_SelectingSteps && m_bStepsChosen[input.pn]