diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs
index 362c06849d..33d99e9b0f 100644
--- a/osu.Game/Configuration/OsuConfigManager.cs
+++ b/osu.Game/Configuration/OsuConfigManager.cs
@@ -214,6 +214,7 @@ namespace osu.Game.Configuration
SetDefault(OsuSetting.EditorContractSidebars, false);
SetDefault(OsuSetting.AlwaysShowHoldForMenuButton, false);
+ SetDefault(OsuSetting.AlwaysRequireHoldingForPause, false);
}
protected override bool CheckLookupContainsPrivateInformation(OsuSetting lookup)
@@ -444,5 +445,6 @@ namespace osu.Game.Configuration
EditorRotationOrigin,
EditorTimelineShowBreaks,
EditorAdjustExistingObjectsOnTimingChanges,
+ AlwaysRequireHoldingForPause
}
}
diff --git a/osu.Game/Localisation/GameplaySettingsStrings.cs b/osu.Game/Localisation/GameplaySettingsStrings.cs
index 6de61f7ebe..ff6a6102a7 100644
--- a/osu.Game/Localisation/GameplaySettingsStrings.cs
+++ b/osu.Game/Localisation/GameplaySettingsStrings.cs
@@ -89,6 +89,11 @@ namespace osu.Game.Localisation
///
public static LocalisableString AlwaysShowHoldForMenuButton => new TranslatableString(getKey(@"always_show_hold_for_menu_button"), @"Always show hold for menu button");
+ ///
+ /// "Require holding key to pause gameplay"
+ ///
+ public static LocalisableString AlwaysRequireHoldForMenu => new TranslatableString(getKey(@"require_holding_key_to_pause_gameplay"), @"Require holding key to pause gameplay");
+
///
/// "Always play first combo break sound"
///
diff --git a/osu.Game/Overlays/Settings/Sections/Gameplay/HUDSettings.cs b/osu.Game/Overlays/Settings/Sections/Gameplay/HUDSettings.cs
index f4dd319152..b4caaf7983 100644
--- a/osu.Game/Overlays/Settings/Sections/Gameplay/HUDSettings.cs
+++ b/osu.Game/Overlays/Settings/Sections/Gameplay/HUDSettings.cs
@@ -41,6 +41,11 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
Current = config.GetBindable(OsuSetting.GameplayLeaderboard),
},
new SettingsCheckbox
+ {
+ LabelText = GameplaySettingsStrings.AlwaysRequireHoldForMenu,
+ Current = config.GetBindable(OsuSetting.AlwaysRequireHoldingForPause),
+ },
+ new SettingsCheckbox
{
LabelText = GameplaySettingsStrings.AlwaysShowHoldForMenuButton,
Current = config.GetBindable(OsuSetting.AlwaysShowHoldForMenuButton),
diff --git a/osu.Game/Screens/Play/HUD/HoldForMenuButton.cs b/osu.Game/Screens/Play/HUD/HoldForMenuButton.cs
index 5d3d5774d0..96e937fda7 100644
--- a/osu.Game/Screens/Play/HUD/HoldForMenuButton.cs
+++ b/osu.Game/Screens/Play/HUD/HoldForMenuButton.cs
@@ -162,14 +162,18 @@ namespace osu.Game.Screens.Play.HUD
private bool pendingAnimation;
private ScheduledDelegate shakeOperation;
+ private Bindable alwaysRequireHold;
+
public HoldButton(bool isDangerousAction)
: base(isDangerousAction)
{
}
[BackgroundDependencyLoader]
- private void load(OsuColour colours)
+ private void load(OsuColour colours, OsuConfigManager config)
{
+ alwaysRequireHold = config.GetBindable(OsuSetting.AlwaysRequireHoldingForPause);
+
Size = new Vector2(60);
Child = new CircularContainer
@@ -300,7 +304,7 @@ namespace osu.Game.Screens.Play.HUD
case GlobalAction.Back:
if (!pendingAnimation)
{
- if (IsDangerousAction)
+ if (IsDangerousAction || alwaysRequireHold.Value)
BeginConfirm();
else
Confirm();
@@ -314,7 +318,7 @@ namespace osu.Game.Screens.Play.HUD
if (!pendingAnimation)
{
- if (IsDangerousAction)
+ if (IsDangerousAction || alwaysRequireHold.Value)
BeginConfirm();
else
Confirm();