1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 14:12:54 +08:00

Hide metadata by default to avoid initial jump when no data present

This commit is contained in:
Dean Herbert 2017-11-29 20:13:00 +09:00
parent 2b7bf285e4
commit b2fc50247c

View File

@ -310,6 +310,39 @@ namespace osu.Game.Screens.Select
private readonly FillFlowContainer textContainer; private readonly FillFlowContainer textContainer;
private TextFlowContainer textFlow; private TextFlowContainer textFlow;
public MetadataSection(string title)
{
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Alpha = 0;
InternalChild = textContainer = new FillFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Spacing = new Vector2(spacing / 2),
Children = new Drawable[]
{
new Container
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Child = new OsuSpriteText
{
Text = title,
Font = @"Exo2.0-Bold",
TextSize = 14,
},
},
textFlow = new TextFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
},
},
};
}
public string Text public string Text
{ {
set set
@ -347,38 +380,6 @@ namespace osu.Game.Screens.Select
get { return textFlow.Colour; } get { return textFlow.Colour; }
set { textFlow.Colour = value; } set { textFlow.Colour = value; }
} }
public MetadataSection(string title)
{
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
InternalChild = textContainer = new FillFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Spacing = new Vector2(spacing / 2),
Children = new Drawable[]
{
new Container
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Child = new OsuSpriteText
{
Text = title,
Font = @"Exo2.0-Bold",
TextSize = 14,
},
},
textFlow = new TextFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
},
},
};
}
} }
private class DimmedLoadingAnimation : VisibilityContainer private class DimmedLoadingAnimation : VisibilityContainer