re-add b5129dd: Allow for 'confirmation only' double press mechanisms as a choice for two part selection on ScreenSelectMusic
(small cleanup on ScreenDimensions)
This commit is contained in:
@@ -13,14 +13,12 @@ static ThemeMetric<float> THEME_SCREEN_HEIGHT("Common","ScreenHeight");
|
|||||||
* of the dimensions up to meet the requested aspect ratio.
|
* of the dimensions up to meet the requested aspect ratio.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* The theme resolution isn't necessarily 4:3; a natively widescreen
|
||||||
* The theme resolution isn't necessarily 4:3; a natively widescreen
|
|
||||||
* theme would have eg. 16:9 or 16:10.
|
* theme would have eg. 16:9 or 16:10.
|
||||||
*
|
*
|
||||||
* Note that "aspect ratio" here always means DAR (display aspect ratio: the
|
* Note that "aspect ratio" here always means DAR (display aspect ratio: the
|
||||||
* aspect ratio of the physical display); we don't care about the PAR (pixel
|
* aspect ratio of the physical display); we don't care about the PAR (pixel
|
||||||
* aspect ratio: the aspect ratio of a pixel).
|
* aspect ratio: the aspect ratio of a pixel). */
|
||||||
*/
|
|
||||||
|
|
||||||
float ScreenDimensions::GetThemeAspectRatio()
|
float ScreenDimensions::GetThemeAspectRatio()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ void ScreenSelectMusic::Init()
|
|||||||
OPTIONS_LIST_TIMEOUT.Load( m_sName, "OptionsListTimeout" );
|
OPTIONS_LIST_TIMEOUT.Load( m_sName, "OptionsListTimeout" );
|
||||||
SELECT_MENU_CHANGES_DIFFICULTY.Load( m_sName, "SelectMenuChangesDifficulty" );
|
SELECT_MENU_CHANGES_DIFFICULTY.Load( m_sName, "SelectMenuChangesDifficulty" );
|
||||||
TWO_PART_SELECTION.Load( m_sName, "TwoPartSelection" );
|
TWO_PART_SELECTION.Load( m_sName, "TwoPartSelection" );
|
||||||
|
TWO_PART_CONFIRMS_ONLY.Load( m_sName, "TwoPartConfirmsOnly" );
|
||||||
WRAP_CHANGE_STEPS.Load( m_sName, "WrapChangeSteps" );
|
WRAP_CHANGE_STEPS.Load( m_sName, "WrapChangeSteps" );
|
||||||
|
|
||||||
m_GameButtonPreviousSong = INPUTMAPPER->GetInputScheme()->ButtonNameToIndex( THEME->GetMetric(m_sName,"PreviousSongButton") );
|
m_GameButtonPreviousSong = INPUTMAPPER->GetInputScheme()->ButtonNameToIndex( THEME->GetMetric(m_sName,"PreviousSongButton") );
|
||||||
@@ -596,6 +597,8 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!TWO_PART_CONFIRMS_ONLY)
|
||||||
|
{
|
||||||
if( m_SelectionState == SelectionState_SelectingSteps &&
|
if( m_SelectionState == SelectionState_SelectingSteps &&
|
||||||
input.type == IET_FIRST_PRESS &&
|
input.type == IET_FIRST_PRESS &&
|
||||||
(input.MenuI == m_GameButtonNextSong || input.MenuI == m_GameButtonPreviousSong) &&
|
(input.MenuI == m_GameButtonNextSong || input.MenuI == m_GameButtonPreviousSong) &&
|
||||||
@@ -616,6 +619,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
|||||||
ChangeSteps( input.pn, +1 );
|
ChangeSteps( input.pn, +1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if( input.type == IET_FIRST_PRESS && DetectCodes(input) )
|
if( input.type == IET_FIRST_PRESS && DetectCodes(input) )
|
||||||
return;
|
return;
|
||||||
@@ -928,7 +932,6 @@ void ScreenSelectMusic::MenuStart( const InputEventPlus &input )
|
|||||||
{
|
{
|
||||||
DEFAULT_FAIL( m_SelectionState );
|
DEFAULT_FAIL( m_SelectionState );
|
||||||
case SelectionState_SelectingSong:
|
case SelectionState_SelectingSong:
|
||||||
|
|
||||||
// If false, we don't have a selection just yet.
|
// If false, we don't have a selection just yet.
|
||||||
if( !m_MusicWheel.Select() )
|
if( !m_MusicWheel.Select() )
|
||||||
return;
|
return;
|
||||||
@@ -1013,6 +1016,8 @@ void ScreenSelectMusic::MenuStart( const InputEventPlus &input )
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool bAllPlayersDoneSelectingSteps = bInitiatedByMenuTimer || bAllOtherHumanPlayersDone;
|
bool bAllPlayersDoneSelectingSteps = bInitiatedByMenuTimer || bAllOtherHumanPlayersDone;
|
||||||
|
if(TWO_PART_CONFIRMS_ONLY)
|
||||||
|
bAllPlayersDoneSelectingSteps = true;
|
||||||
|
|
||||||
/* TRICKY: if we have a Routine chart selected, we need to ensure
|
/* TRICKY: if we have a Routine chart selected, we need to ensure
|
||||||
* the following:
|
* the following:
|
||||||
@@ -1126,6 +1131,15 @@ void ScreenSelectMusic::MenuStart( const InputEventPlus &input )
|
|||||||
|
|
||||||
m_soundStart.Play();
|
m_soundStart.Play();
|
||||||
|
|
||||||
|
// If the MenuTimer has forced us to move on && TWO_PART_CONFIRMS_ONLY,
|
||||||
|
// set Selection State to finalized and move on.
|
||||||
|
if(TWO_PART_CONFIRMS_ONLY)
|
||||||
|
{
|
||||||
|
if(m_MenuTimer->GetSeconds() < 1)
|
||||||
|
{
|
||||||
|
m_SelectionState = SelectionState_Finalized;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if( m_SelectionState == SelectionState_Finalized )
|
if( m_SelectionState == SelectionState_Finalized )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ protected:
|
|||||||
ThemeMetric<RString> SELECT_MENU_NAME;
|
ThemeMetric<RString> SELECT_MENU_NAME;
|
||||||
ThemeMetric<bool> SELECT_MENU_CHANGES_DIFFICULTY;
|
ThemeMetric<bool> SELECT_MENU_CHANGES_DIFFICULTY;
|
||||||
ThemeMetric<bool> TWO_PART_SELECTION;
|
ThemeMetric<bool> TWO_PART_SELECTION;
|
||||||
|
ThemeMetric<bool> TWO_PART_CONFIRMS_ONLY;
|
||||||
ThemeMetric<bool> WRAP_CHANGE_STEPS;
|
ThemeMetric<bool> WRAP_CHANGE_STEPS;
|
||||||
|
|
||||||
bool CanChangeSong() const { return m_SelectionState == SelectionState_SelectingSong; }
|
bool CanChangeSong() const { return m_SelectionState == SelectionState_SelectingSong; }
|
||||||
|
|||||||
Reference in New Issue
Block a user