mirror of
https://github.com/ppy/osu.git
synced 2025-03-13 02:27:20 +08:00
Add setting to allow hold-for-pause to still exist
Users have asked for this multiple times since last release. Not sure on the best default value, but I'm going with the stable/classic one, at least for the initial release to avoid needing migrations. In the future we may reconsider this for new users.
This commit is contained in:
parent
285959943f
commit
e3ea38a366
@ -214,6 +214,7 @@ namespace osu.Game.Configuration
|
|||||||
SetDefault(OsuSetting.EditorContractSidebars, false);
|
SetDefault(OsuSetting.EditorContractSidebars, false);
|
||||||
|
|
||||||
SetDefault(OsuSetting.AlwaysShowHoldForMenuButton, false);
|
SetDefault(OsuSetting.AlwaysShowHoldForMenuButton, false);
|
||||||
|
SetDefault(OsuSetting.AlwaysRequireHoldingForPause, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool CheckLookupContainsPrivateInformation(OsuSetting lookup)
|
protected override bool CheckLookupContainsPrivateInformation(OsuSetting lookup)
|
||||||
@ -444,5 +445,6 @@ namespace osu.Game.Configuration
|
|||||||
EditorRotationOrigin,
|
EditorRotationOrigin,
|
||||||
EditorTimelineShowBreaks,
|
EditorTimelineShowBreaks,
|
||||||
EditorAdjustExistingObjectsOnTimingChanges,
|
EditorAdjustExistingObjectsOnTimingChanges,
|
||||||
|
AlwaysRequireHoldingForPause
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,6 +89,11 @@ namespace osu.Game.Localisation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString AlwaysShowHoldForMenuButton => new TranslatableString(getKey(@"always_show_hold_for_menu_button"), @"Always show hold for menu button");
|
public static LocalisableString AlwaysShowHoldForMenuButton => new TranslatableString(getKey(@"always_show_hold_for_menu_button"), @"Always show hold for menu button");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Require holding key to pause gameplay"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString AlwaysRequireHoldForMenu => new TranslatableString(getKey(@"require_holding_key_to_pause_gameplay"), @"Require holding key to pause gameplay");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// "Always play first combo break sound"
|
/// "Always play first combo break sound"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -41,6 +41,11 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
|||||||
Current = config.GetBindable<bool>(OsuSetting.GameplayLeaderboard),
|
Current = config.GetBindable<bool>(OsuSetting.GameplayLeaderboard),
|
||||||
},
|
},
|
||||||
new SettingsCheckbox
|
new SettingsCheckbox
|
||||||
|
{
|
||||||
|
LabelText = GameplaySettingsStrings.AlwaysRequireHoldForMenu,
|
||||||
|
Current = config.GetBindable<bool>(OsuSetting.AlwaysRequireHoldingForPause),
|
||||||
|
},
|
||||||
|
new SettingsCheckbox
|
||||||
{
|
{
|
||||||
LabelText = GameplaySettingsStrings.AlwaysShowHoldForMenuButton,
|
LabelText = GameplaySettingsStrings.AlwaysShowHoldForMenuButton,
|
||||||
Current = config.GetBindable<bool>(OsuSetting.AlwaysShowHoldForMenuButton),
|
Current = config.GetBindable<bool>(OsuSetting.AlwaysShowHoldForMenuButton),
|
||||||
|
@ -162,14 +162,18 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
private bool pendingAnimation;
|
private bool pendingAnimation;
|
||||||
private ScheduledDelegate shakeOperation;
|
private ScheduledDelegate shakeOperation;
|
||||||
|
|
||||||
|
private Bindable<bool> alwaysRequireHold;
|
||||||
|
|
||||||
public HoldButton(bool isDangerousAction)
|
public HoldButton(bool isDangerousAction)
|
||||||
: base(isDangerousAction)
|
: base(isDangerousAction)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours, OsuConfigManager config)
|
||||||
{
|
{
|
||||||
|
alwaysRequireHold = config.GetBindable<bool>(OsuSetting.AlwaysRequireHoldingForPause);
|
||||||
|
|
||||||
Size = new Vector2(60);
|
Size = new Vector2(60);
|
||||||
|
|
||||||
Child = new CircularContainer
|
Child = new CircularContainer
|
||||||
@ -300,7 +304,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
case GlobalAction.Back:
|
case GlobalAction.Back:
|
||||||
if (!pendingAnimation)
|
if (!pendingAnimation)
|
||||||
{
|
{
|
||||||
if (IsDangerousAction)
|
if (IsDangerousAction || alwaysRequireHold.Value)
|
||||||
BeginConfirm();
|
BeginConfirm();
|
||||||
else
|
else
|
||||||
Confirm();
|
Confirm();
|
||||||
@ -314,7 +318,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
|
|
||||||
if (!pendingAnimation)
|
if (!pendingAnimation)
|
||||||
{
|
{
|
||||||
if (IsDangerousAction)
|
if (IsDangerousAction || alwaysRequireHold.Value)
|
||||||
BeginConfirm();
|
BeginConfirm();
|
||||||
else
|
else
|
||||||
Confirm();
|
Confirm();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user