1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 13:47:24 +08:00

Abbreviate common bank names on timeline

This commit is contained in:
OliBomby 2023-05-08 13:16:30 +02:00
parent e945846759
commit 3b5bae7742

View File

@ -48,7 +48,18 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
private void updateText()
{
Label.Text = $"{GetBankValue(GetSamples())} {GetVolumeValue(GetSamples())}";
Label.Text = $"{abbreviateBank(GetBankValue(GetSamples()))} {GetVolumeValue(GetSamples())}";
}
private static string? abbreviateBank(string? bank)
{
return bank switch
{
"normal" => "N",
"soft" => "S",
"drum" => "D",
_ => bank
};
}
public static string? GetBankValue(IEnumerable<HitSampleInfo> samples)