mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Improve code quality
This commit is contained in:
@ -320,26 +320,25 @@ namespace osu.Game.Screens.Select
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.FadeIn(transition_duration);
|
|
||||||
setTextAsync(value);
|
setTextAsync(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setTextAsync(string text)
|
private void setTextAsync(string text)
|
||||||
{
|
{
|
||||||
var newTextFlow = new TextFlowContainer
|
LoadComponentAsync(new TextFlowContainer(s => s.TextSize = 14)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Colour = textFlow.Colour,
|
Colour = textFlow.Colour,
|
||||||
};
|
Text = text
|
||||||
|
}, loaded =>
|
||||||
newTextFlow.AddText(text, s => s.TextSize = 14);
|
|
||||||
|
|
||||||
LoadComponentAsync(newTextFlow, d =>
|
|
||||||
{
|
{
|
||||||
textContainer.Remove(textFlow);
|
textFlow?.Expire();
|
||||||
textContainer.Add(textFlow = d);
|
textContainer.Add(textFlow = loaded);
|
||||||
|
|
||||||
|
// fade in if we haven't yet.
|
||||||
|
this.FadeIn(transition_duration);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user