Added AllowHoldForOptions preference.

Back button now only backs out of a screen on a press.
Updated changelog.
This commit is contained in:
Kyzentun Keeslala
2016-06-24 16:55:01 -06:00
parent 019ef5728a
commit 7bd64c32af
13 changed files with 97 additions and 13 deletions
+1
View File
@@ -211,6 +211,7 @@ PrefsManager::PrefsManager() :
m_bMercifulBeginner ( "MercifulBeginner", false ),
m_bMercifulSuperMeter ( "MercifulSuperMeter", true ),
m_bDelayedBack ( "DelayedBack", true ),
m_AllowHoldForOptions("AllowHoldForOptions", true),
m_bShowInstructions ( "ShowInstructions", true ),
m_bShowCaution ( "ShowCaution", true ),
m_bShowNativeLanguage ( "ShowNativeLanguage", true ),
+1
View File
@@ -203,6 +203,7 @@ public:
Preference<bool> m_bMercifulBeginner; // don't subtract from percent score or grade DP, larger W5 window
Preference<bool> m_bMercifulSuperMeter; // negative super deltas are scaled by the players life percentage
Preference<bool> m_bDelayedBack;
Preference<bool> m_AllowHoldForOptions;
Preference<bool> m_bShowInstructions; // how to play a mode
Preference<bool> m_bShowCaution;
Preference<bool> m_bShowNativeLanguage;
+4 -2
View File
@@ -213,8 +213,10 @@ bool Screen::Input( const InputEventPlus &input )
case GAME_BUTTON_MENULEFT: return this->MenuLeft ( input );
case GAME_BUTTON_MENURIGHT: return this->MenuRight( input );
case GAME_BUTTON_BACK:
// Don't make the user hold the back button if they're pressing escape and escape is the back button.
if( !PREFSMAN->m_bDelayedBack || input.type==IET_REPEAT || (input.DeviceI.device == DEVICE_KEYBOARD && input.DeviceI.button == KEY_ESC) )
// Only go back on first press. If somebody is backing out of the
// options screen, they might still be holding it when select music
// appears, and accidentally back out of that too. -Kyz
if(input.type == IET_FIRST_PRESS)
{
if( HANDLE_BACK_BUTTON )
return this->MenuBack( input );
+11 -4
View File
@@ -67,6 +67,7 @@
#define SHOW_SCORE_IN_RAVE THEME->GetMetricB(m_sName,"ShowScoreInRave")
#define SONG_POSITION_METER_WIDTH THEME->GetMetricF(m_sName,"SongPositionMeterWidth")
#define STOP_COURSE_EARLY THEME->GetMetricB(m_sName,"StopCourseEarly") // evaluate this every time it's used
#define USE_PAUSE_MENU_INSTEAD_OF_GIVE_UP THEME->GetMetricB(m_sName, "UsePauseMenuInsteadOfGiveUp")
static ThemeMetric<float> INITIAL_BACKGROUND_BRIGHTNESS ("ScreenGameplay","InitialBackgroundBrightness");
static ThemeMetric<float> SECONDS_BETWEEN_COMMENTS ("ScreenGameplay","SecondsBetweenComments");
@@ -904,6 +905,8 @@ void ScreenGameplay::Init()
m_GiveUpTimer.SetZero();
m_SkipSongTimer.SetZero();
m_gave_up= false;
m_skipped_song= false;
}
bool ScreenGameplay::Center1Player() const
@@ -1933,9 +1936,13 @@ void ScreenGameplay::Update( float fDeltaTime )
}
// update give up
bool bGiveUpTimerFired = !m_GiveUpTimer.IsZero() && m_GiveUpTimer.Ago() > GIVE_UP_SECONDS;
m_gave_up= bGiveUpTimerFired;
m_skipped_song= !m_SkipSongTimer.IsZero() && m_SkipSongTimer.Ago() > GIVE_UP_SECONDS;
bool bGiveUpTimerFired = false;
if(!USE_PAUSE_MENU_INSTEAD_OF_GIVE_UP)
{
bGiveUpTimerFired= !m_GiveUpTimer.IsZero() && m_GiveUpTimer.Ago() > GIVE_UP_SECONDS;
m_gave_up= bGiveUpTimerFired;
m_skipped_song= !m_SkipSongTimer.IsZero() && m_SkipSongTimer.Ago() > GIVE_UP_SECONDS;
}
bool bAllHumanHaveBigMissCombo = true;
@@ -2444,7 +2451,7 @@ bool ScreenGameplay::Input( const InputEventPlus &input )
return false;
}
if( m_DancingState != STATE_OUTRO &&
if(!USE_PAUSE_MENU_INSTEAD_OF_GIVE_UP && m_DancingState != STATE_OUTRO &&
GAMESTATE->IsHumanPlayer(input.pn) &&
!m_Cancel.IsTransitioning() )
{
+1
View File
@@ -783,6 +783,7 @@ static void InitializeConfOptions()
ADD( ConfOption( "OnlyDedicatedMenuButtons", MovePref<bool>, "Use Gameplay Buttons","Only Dedicated Buttons" ) );
ADD( ConfOption( "AutoPlay", MovePref<PlayerController>, "Off","On","CPU-Controlled" ) );
ADD( ConfOption( "DelayedBack", MovePref<bool>, "Instant","Hold" ) );
ADD( ConfOption( "AllowHoldForOptions", MovePref<bool>, "Double Tap", "Hold"));
ADD( ConfOption( "ArcadeOptionsNavigation", MovePref<bool>, "StepMania Style","Arcade Style" ) );
ADD( ConfOption( "ThreeKeyNavigation", MovePref<bool>, "Five Key Menu", "Three Key Menu" ) );
ADD( ConfOption( "MusicWheelSwitchSpeed", MusicWheelSwitchSpeed, "Slow","Normal","Fast","Really Fast" ) );
+4 -1
View File
@@ -1517,7 +1517,10 @@ bool ScreenSelectMusic::MenuStart( const InputEventPlus &input )
* hit accidentally. Accept an initial START right away, though,
* so we don't ignore deliberate fast presses (which would be
* annoying). */
this->PostScreenMessage( SM_AllowOptionsMenuRepeat, 0.5f );
if(PREFSMAN->m_AllowHoldForOptions.Get())
{
this->PostScreenMessage( SM_AllowOptionsMenuRepeat, 0.5f );
}
StartTransitioningScreen( SM_None );
float fTime = max( SHOW_OPTIONS_MESSAGE_SECONDS, this->GetTweenTimeLeft() );