mirror of
https://github.com/ppy/osu
synced 2025-02-26 23:51:04 +00:00
Make quick restart even faster
This commit is contained in:
parent
60d45d44bb
commit
2dbc275bb8
@ -51,6 +51,8 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
public override bool? AllowGlobalTrackControl => false;
|
public override bool? AllowGlobalTrackControl => false;
|
||||||
|
|
||||||
|
public override float BackgroundParallaxAmount => quickRestart ? 0 : 1;
|
||||||
|
|
||||||
// Here because IsHovered will not update unless we do so.
|
// Here because IsHovered will not update unless we do so.
|
||||||
public override bool HandlePositionalInput => true;
|
public override bool HandlePositionalInput => true;
|
||||||
|
|
||||||
@ -387,7 +389,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
// We need to perform this check here rather than in OnHover as any number of children of VisualSettings
|
// We need to perform this check here rather than in OnHover as any number of children of VisualSettings
|
||||||
// may also be handling the hover events.
|
// may also be handling the hover events.
|
||||||
if (inputManager.HoveredDrawables.Contains(VisualSettings))
|
if (inputManager.HoveredDrawables.Contains(VisualSettings) || quickRestart)
|
||||||
{
|
{
|
||||||
// Preview user-defined background dim and blur when hovered on the visual settings panel.
|
// Preview user-defined background dim and blur when hovered on the visual settings panel.
|
||||||
ApplyToBackground(b =>
|
ApplyToBackground(b =>
|
||||||
@ -458,8 +460,9 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
if (quickRestart)
|
if (quickRestart)
|
||||||
{
|
{
|
||||||
prepareNewPlayer();
|
// A slight delay is added here to avoid an awkward stutter during the initial animation.
|
||||||
content.ScaleTo(1, 650, Easing.OutQuint);
|
Scheduler.AddDelayed(prepareNewPlayer, 100);
|
||||||
|
content.ScaleTo(1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -467,15 +470,15 @@ namespace osu.Game.Screens.Play
|
|||||||
.ScaleTo(1, 650, Easing.OutQuint)
|
.ScaleTo(1, 650, Easing.OutQuint)
|
||||||
.Then()
|
.Then()
|
||||||
.Schedule(prepareNewPlayer);
|
.Schedule(prepareNewPlayer);
|
||||||
}
|
|
||||||
|
|
||||||
using (BeginDelayedSequence(delayBeforeSideDisplays))
|
using (BeginDelayedSequence(delayBeforeSideDisplays))
|
||||||
{
|
{
|
||||||
settingsScroll.FadeInFromZero(500, Easing.Out)
|
settingsScroll.FadeInFromZero(500, Easing.Out)
|
||||||
.MoveToX(0, 500, Easing.OutQuint);
|
.MoveToX(0, 500, Easing.OutQuint);
|
||||||
|
|
||||||
disclaimers.FadeInFromZero(500, Easing.Out)
|
disclaimers.FadeInFromZero(500, Easing.Out)
|
||||||
.MoveToX(0, 500, Easing.OutQuint);
|
.MoveToX(0, 500, Easing.OutQuint);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AddRangeInternal(new[]
|
AddRangeInternal(new[]
|
||||||
@ -565,7 +568,7 @@ namespace osu.Game.Screens.Play
|
|||||||
else
|
else
|
||||||
this.Exit();
|
this.Exit();
|
||||||
});
|
});
|
||||||
}, 500);
|
}, quickRestart ? 0 : 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cancelLoad()
|
private void cancelLoad()
|
||||||
|
Loading…
Reference in New Issue
Block a user