1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 05:27:23 +08:00

Simplify string bindings

This commit is contained in:
Dean Herbert 2022-03-30 17:59:45 +09:00
parent bc0b982102
commit f9f6248101

View File

@ -287,12 +287,14 @@ namespace osu.Game.Screens.Select
{
TitleLabel = new OsuSpriteText
{
Current = { BindTarget = titleBinding },
Font = OsuFont.GetFont(size: 28, italics: true),
RelativeSizeAxes = Axes.X,
Truncate = true,
},
ArtistLabel = new OsuSpriteText
{
Current = { BindTarget = artistBinding },
Font = OsuFont.GetFont(size: 17, italics: true),
RelativeSizeAxes = Axes.X,
Truncate = true,
@ -314,9 +316,6 @@ namespace osu.Game.Screens.Select
}
};
titleBinding.BindValueChanged(_ => setMetadata());
artistBinding.BindValueChanged(_ => setMetadata(), true);
addInfoLabels();
}
@ -352,12 +351,6 @@ namespace osu.Game.Screens.Select
}, true);
}
private void setMetadata()
{
ArtistLabel.Text = artistBinding.Value;
TitleLabel.Text = titleBinding.Value;
}
private void addInfoLabels()
{
if (working.Beatmap?.HitObjects?.Any() != true)