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