Merge pull request #3632 from HoLLy-HaCKeR/fix-beatmap-details

Fade MetadataSection back in if non-null Text is set
This commit is contained in:
Dan Balasescu
2018-10-27 10:36:07 +09:00
committed by GitHub

View File

@ -307,10 +307,10 @@ namespace osu.Game.Screens.Select
{ {
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y; AutoSizeAxes = Axes.Y;
Alpha = 0;
InternalChild = textContainer = new FillFlowContainer InternalChild = textContainer = new FillFlowContainer
{ {
Alpha = 0,
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
Spacing = new Vector2(spacing / 2), Spacing = new Vector2(spacing / 2),
@ -337,7 +337,7 @@ namespace osu.Game.Screens.Select
{ {
if (string.IsNullOrEmpty(value)) if (string.IsNullOrEmpty(value))
{ {
this.FadeOut(transition_duration); textContainer.FadeOut(transition_duration);
return; return;
} }
@ -345,8 +345,6 @@ namespace osu.Game.Screens.Select
} }
} }
public override bool IsPresent => base.IsPresent || textFlow == null; // Visibility is updated in the LoadComponentAsync callback
private void setTextAsync(string text) private void setTextAsync(string text)
{ {
LoadComponentAsync(new OsuTextFlowContainer(s => s.TextSize = 14) LoadComponentAsync(new OsuTextFlowContainer(s => s.TextSize = 14)
@ -361,7 +359,7 @@ namespace osu.Game.Screens.Select
textContainer.Add(textFlow = loaded); textContainer.Add(textFlow = loaded);
// fade in if we haven't yet. // fade in if we haven't yet.
this.FadeIn(transition_duration); textContainer.FadeIn(transition_duration);
}); });
} }
} }