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:
parent
507da0dfb7
commit
b4513497d6
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user