mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 01:17:35 +09:00
Fade only textContainer instead of entire MetadataSection
This commit is contained in:
parent
88aca46500
commit
cf3b4447eb
@ -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,17 +337,14 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(value))
|
if (string.IsNullOrEmpty(value))
|
||||||
{
|
{
|
||||||
this.FadeOut(transition_duration);
|
textContainer.FadeOut(transition_duration);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.FadeIn(transition_duration);
|
|
||||||
setTextAsync(value);
|
setTextAsync(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
||||||
@ -362,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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user