mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:12:54 +08:00
Fix player never completing load
This commit is contained in:
parent
8ea7ec6445
commit
28f5c950ec
@ -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,27 +53,35 @@ namespace osu.Game.Screens.Play
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
AddInternal(info = new BeatmapMetadataDisplay(Beatmap.Value)
|
InternalChild = content = new Container
|
||||||
{
|
{
|
||||||
Alpha = 0,
|
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
});
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Children = new Drawable[]
|
||||||
AddInternal(new FillFlowContainer<PlayerSettingsGroup>
|
|
||||||
{
|
|
||||||
Anchor = Anchor.TopRight,
|
|
||||||
Origin = Anchor.TopRight,
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
Direction = FillDirection.Vertical,
|
|
||||||
Spacing = new Vector2(0, 20),
|
|
||||||
Margin = new MarginPadding(25),
|
|
||||||
Children = new PlayerSettingsGroup[]
|
|
||||||
{
|
{
|
||||||
visualSettings = new VisualSettings(),
|
info = new BeatmapMetadataDisplay(Beatmap.Value)
|
||||||
new InputSettings()
|
{
|
||||||
|
Alpha = 0,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
},
|
||||||
|
new FillFlowContainer<PlayerSettingsGroup>
|
||||||
|
{
|
||||||
|
Anchor = Anchor.TopRight,
|
||||||
|
Origin = Anchor.TopRight,
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Direction = FillDirection.Vertical,
|
||||||
|
Spacing = new Vector2(0, 20),
|
||||||
|
Margin = new MarginPadding(25),
|
||||||
|
Children = new PlayerSettingsGroup[]
|
||||||
|
{
|
||||||
|
visualSettings = new VisualSettings(),
|
||||||
|
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();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user