mirror of
https://github.com/ppy/osu.git
synced 2025-03-06 04:33:21 +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 class MetadataSection : Container
|
||||||
{
|
{
|
||||||
|
private readonly FillFlowContainer textContainer;
|
||||||
private TextFlowContainer textFlow;
|
private TextFlowContainer textFlow;
|
||||||
|
|
||||||
public string Text
|
public string Text
|
||||||
@ -338,7 +339,6 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
LoadComponentAsync(newTextFlow, d =>
|
LoadComponentAsync(newTextFlow, d =>
|
||||||
{
|
{
|
||||||
var textContainer = (InternalChild as FillFlowContainer);
|
|
||||||
textContainer.Remove(textFlow);
|
textContainer.Remove(textFlow);
|
||||||
textContainer.Add(textFlow = d);
|
textContainer.Add(textFlow = d);
|
||||||
});
|
});
|
||||||
@ -355,7 +355,7 @@ namespace osu.Game.Screens.Select
|
|||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
AutoSizeAxes = Axes.Y;
|
AutoSizeAxes = Axes.Y;
|
||||||
|
|
||||||
InternalChild = new FillFlowContainer
|
InternalChild = textContainer = new FillFlowContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Loading…
Reference in New Issue
Block a user