Merge branch 'master' into epilepsy-warning

This commit is contained in:
Bartłomiej Dach
2020-10-20 01:06:46 +02:00
1042 changed files with 27494 additions and 8252 deletions

View File

@ -70,7 +70,7 @@ namespace osu.Game.Screens.Play
private bool readyForPush =>
// don't push unless the player is completely loaded
player.LoadState == LoadState.Ready
player?.LoadState == LoadState.Ready
// don't push if the user is hovering one of the panes, unless they are idle.
&& (IsHovered || idleTracker.IsIdle.Value)
// don't push if the user is dragging a slider or otherwise.
@ -167,8 +167,6 @@ namespace osu.Game.Screens.Play
{
base.OnEntering(last);
prepareNewPlayer();
content.ScaleTo(0.7f);
Background?.FadeColour(Color4.White, 800, Easing.OutQuint);
@ -186,11 +184,6 @@ namespace osu.Game.Screens.Play
contentIn();
MetadataInfo.Loading = true;
// we will only be resumed if the player has requested a re-run (see restartRequested).
prepareNewPlayer();
this.Delay(400).Schedule(pushWhenLoaded);
}
@ -271,6 +264,9 @@ namespace osu.Game.Screens.Play
private void prepareNewPlayer()
{
if (!this.IsCurrentScreen())
return;
var restartCount = player?.RestartCount + 1 ?? 0;
player = createPlayer();
@ -288,8 +284,10 @@ namespace osu.Game.Screens.Play
private void contentIn()
{
content.ScaleTo(1, 650, Easing.OutQuint);
MetadataInfo.Loading = true;
content.FadeInFromZero(400);
content.ScaleTo(1, 650, Easing.OutQuint).Then().Schedule(prepareNewPlayer);
}
private void contentOut()