mirror of
https://github.com/ppy/osu.git
synced 2025-01-23 17:33:09 +08:00
Merge pull request #30878 from peppy/config-pause-hold-thing-of-course
Add setting to allow hold-for-pause to still exist
This commit is contained in:
commit
943837e3b5
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -89,6 +89,11 @@ namespace osu.Game.Localisation
|
||||
/// </summary>
|
||||
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>
|
||||
/// "Always play first combo break sound"
|
||||
/// </summary>
|
||||
|
@ -41,6 +41,11 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
Current = config.GetBindable<bool>(OsuSetting.GameplayLeaderboard),
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = GameplaySettingsStrings.AlwaysRequireHoldForMenu,
|
||||
Current = config.GetBindable<bool>(OsuSetting.AlwaysRequireHoldingForPause),
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = GameplaySettingsStrings.AlwaysShowHoldForMenuButton,
|
||||
Current = config.GetBindable<bool>(OsuSetting.AlwaysShowHoldForMenuButton),
|
||||
|
@ -162,14 +162,18 @@ namespace osu.Game.Screens.Play.HUD
|
||||
private bool pendingAnimation;
|
||||
private ScheduledDelegate shakeOperation;
|
||||
|
||||
private Bindable<bool> alwaysRequireHold;
|
||||
|
||||
public HoldButton(bool isDangerousAction)
|
||||
: base(isDangerousAction)
|
||||
{
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load(OsuColour colours, OsuConfigManager config)
|
||||
{
|
||||
alwaysRequireHold = config.GetBindable<bool>(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();
|
||||
|
Loading…
Reference in New Issue
Block a user