mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Use LocalisableDescription
from BeatmapOnlineStatus
enum instead of locally defined
This commit is contained in:
@ -130,46 +130,10 @@ namespace osu.Game.Skinning.Components
|
||||
//update Length
|
||||
valueDictionary[BeatmapAttribute.Length] = TimeSpan.FromMilliseconds(workingBeatmap.BeatmapInfo.Length).ToFormattedDuration();
|
||||
//update Status
|
||||
valueDictionary[BeatmapAttribute.RankedStatus] = GetBetmapStatus(workingBeatmap.BeatmapInfo.Status);
|
||||
valueDictionary[BeatmapAttribute.RankedStatus] = workingBeatmap.BeatmapInfo.Status.GetLocalisableDescription();
|
||||
//update BPM
|
||||
valueDictionary[BeatmapAttribute.BPM] = workingBeatmap.BeatmapInfo.BPM.ToString("F2");
|
||||
}
|
||||
|
||||
public static LocalisableString GetBetmapStatus(BeatmapOnlineStatus status)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
case BeatmapOnlineStatus.Approved:
|
||||
return BeatmapsetsStrings.ShowStatusApproved;
|
||||
|
||||
case BeatmapOnlineStatus.Graveyard:
|
||||
return BeatmapsetsStrings.ShowStatusGraveyard;
|
||||
|
||||
case BeatmapOnlineStatus.Loved:
|
||||
return BeatmapsetsStrings.ShowStatusLoved;
|
||||
|
||||
case BeatmapOnlineStatus.None:
|
||||
return "None";
|
||||
|
||||
case BeatmapOnlineStatus.Pending:
|
||||
return BeatmapsetsStrings.ShowStatusPending;
|
||||
|
||||
case BeatmapOnlineStatus.Qualified:
|
||||
return BeatmapsetsStrings.ShowStatusQualified;
|
||||
|
||||
case BeatmapOnlineStatus.Ranked:
|
||||
return BeatmapsetsStrings.ShowStatusRanked;
|
||||
|
||||
case BeatmapOnlineStatus.LocallyModified:
|
||||
return SongSelectStrings.LocallyModified;
|
||||
|
||||
case BeatmapOnlineStatus.WIP:
|
||||
return BeatmapsetsStrings.ShowStatusWip;
|
||||
|
||||
default:
|
||||
return @"null";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum BeatmapAttribute
|
||||
|
Reference in New Issue
Block a user