1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-05 14:22:55 +08:00

Added a textContainer reference to MetadataSection so casting is no longer required for setting new text

This commit is contained in:
FreezyLemon 2017-11-27 08:52:26 +01:00
parent 507da0dfb7
commit b4513497d6

View File

@ -308,6 +308,7 @@ namespace osu.Game.Screens.Select
private class MetadataSection : Container
{
private readonly FillFlowContainer textContainer;
private TextFlowContainer textFlow;
public string Text
@ -338,7 +339,6 @@ namespace osu.Game.Screens.Select
LoadComponentAsync(newTextFlow, d =>
{
var textContainer = (InternalChild as FillFlowContainer);
textContainer.Remove(textFlow);
textContainer.Add(textFlow = d);
});
@ -355,7 +355,7 @@ namespace osu.Game.Screens.Select
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
InternalChild = new FillFlowContainer
InternalChild = textContainer = new FillFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,