mirror of
https://github.com/ppy/osu.git
synced 2024-11-15 16:27:43 +08:00
Abbreviate common bank names on timeline
This commit is contained in:
parent
e945846759
commit
3b5bae7742
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user