Fix player never completing load

This commit is contained in:
smoogipoo 2019-01-24 19:55:42 +09:00
parent 8ea7ec6445
commit 28f5c950ec

View File

@ -30,6 +30,8 @@ namespace osu.Game.Screens.Play
private Player player;
private Container content;
private BeatmapMetadataDisplay info;
private bool hideOverlays;
@ -51,14 +53,20 @@ namespace osu.Game.Screens.Play
[BackgroundDependencyLoader]
private void load()
{
AddInternal(info = new BeatmapMetadataDisplay(Beatmap.Value)
InternalChild = content = new Container
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
info = new BeatmapMetadataDisplay(Beatmap.Value)
{
Alpha = 0,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
});
AddInternal(new FillFlowContainer<PlayerSettingsGroup>
},
new FillFlowContainer<PlayerSettingsGroup>
{
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
@ -71,7 +79,9 @@ namespace osu.Game.Screens.Play
visualSettings = new VisualSettings(),
new InputSettings()
}
});
}
}
};
loadNewPlayer();
}
@ -105,21 +115,21 @@ namespace osu.Game.Screens.Play
private void contentIn()
{
this.ScaleTo(1, 650, Easing.OutQuint);
this.FadeInFromZero(400);
content.ScaleTo(1, 650, Easing.OutQuint);
content.FadeInFromZero(400);
}
private void contentOut()
{
this.ScaleTo(0.7f, 300, Easing.InQuint);
this.FadeOut(250);
content.ScaleTo(0.7f, 300, Easing.InQuint);
content.FadeOut(250);
}
public override void OnEntering(IScreen last)
{
base.OnEntering(last);
this.ScaleTo(0.7f);
content.ScaleTo(0.7f);
contentIn();
@ -226,7 +236,7 @@ namespace osu.Game.Screens.Play
public override bool OnExiting(IScreen next)
{
this.ScaleTo(0.7f, 150, Easing.InQuint);
content.ScaleTo(0.7f, 150, Easing.InQuint);
this.FadeOut(150);
cancelLoad();