1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-30 02:22:55 +08:00

Improve implementation

This commit is contained in:
BlauFx 2022-08-08 20:53:05 +02:00
parent fac2596eee
commit f6e65cf1af
No known key found for this signature in database
GPG Key ID: BB73374479D2AA97
2 changed files with 7 additions and 7 deletions

View File

@ -81,6 +81,11 @@ namespace osu.Game.Screens.Play
private bool isRestarting; private bool isRestarting;
/// <summary>
/// Is set to true when pressed the via the quick retry hotkey.
/// </summary>
public Bindable<bool> IsQuickRestart = new Bindable<bool>();
private Bindable<bool> mouseWheelDisabled; private Bindable<bool> mouseWheelDisabled;
private readonly Bindable<bool> storyboardReplacesBackground = new Bindable<bool>(); private readonly Bindable<bool> storyboardReplacesBackground = new Bindable<bool>();
@ -287,7 +292,7 @@ namespace osu.Game.Screens.Play
{ {
if (!this.IsCurrentScreen()) return; if (!this.IsCurrentScreen()) return;
Configuration.AutomaticallySkipIntro = true; IsQuickRestart.Value = true;
fadeOut(true); fadeOut(true);
Restart(); Restart();
}, },
@ -370,10 +375,7 @@ namespace osu.Game.Screens.Play
skipIntroOverlay.IsSkippable.ValueChanged += e => skipIntroOverlay.IsSkippable.ValueChanged += e =>
{ {
if (Configuration.AutomaticallySkipIntro && e.NewValue && RestartCount > 0) if (Configuration.AutomaticallySkipIntro && e.NewValue && RestartCount > 0)
{
Configuration.AutomaticallySkipIntro = false;
performUserRequestedSkip(); performUserRequestedSkip();
}
}; };
} }

View File

@ -386,9 +386,7 @@ namespace osu.Game.Screens.Play
private void restartRequested() private void restartRequested()
{ {
if (CurrentPlayer != null) if (CurrentPlayer != null)
{ isHotKeyRestart = CurrentPlayer.IsQuickRestart.Value;
isHotKeyRestart = CurrentPlayer.Configuration.AutomaticallySkipIntro;
}
hideOverlays = true; hideOverlays = true;
ValidForResume = true; ValidForResume = true;