2019-01-24 16:43:03 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2021-06-16 18:07:11 +08:00
|
|
|
|
using System;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using System.ComponentModel;
|
2021-06-16 18:07:11 +08:00
|
|
|
|
using osu.Framework.Localisation;
|
|
|
|
|
using osu.Game.Resources.Localisation.Web;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2018-11-28 15:12:57 +08:00
|
|
|
|
namespace osu.Game.Scoring
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2021-06-16 18:07:11 +08:00
|
|
|
|
[LocalisableEnum(typeof(ScoreRankEnumLocalisationMapper))]
|
2018-04-13 17:19:50 +08:00
|
|
|
|
public enum ScoreRank
|
|
|
|
|
{
|
2019-06-09 00:10:00 +08:00
|
|
|
|
[Description(@"D")]
|
2018-04-13 17:19:50 +08:00
|
|
|
|
D,
|
2019-02-28 12:31:40 +08:00
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
[Description(@"C")]
|
|
|
|
|
C,
|
2019-02-28 12:31:40 +08:00
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
[Description(@"B")]
|
|
|
|
|
B,
|
2019-02-28 12:31:40 +08:00
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
[Description(@"A")]
|
|
|
|
|
A,
|
2019-02-28 12:31:40 +08:00
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
[Description(@"S")]
|
|
|
|
|
S,
|
2019-02-28 12:31:40 +08:00
|
|
|
|
|
2019-04-21 20:38:12 +08:00
|
|
|
|
[Description(@"S+")]
|
2018-04-13 17:19:50 +08:00
|
|
|
|
SH,
|
2019-02-28 12:31:40 +08:00
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
[Description(@"SS")]
|
|
|
|
|
X,
|
2019-02-28 12:31:40 +08:00
|
|
|
|
|
2019-04-21 20:38:12 +08:00
|
|
|
|
[Description(@"SS+")]
|
2018-04-13 17:19:50 +08:00
|
|
|
|
XH,
|
|
|
|
|
}
|
2021-06-16 18:07:11 +08:00
|
|
|
|
|
|
|
|
|
public class ScoreRankEnumLocalisationMapper : EnumLocalisationMapper<ScoreRank>
|
|
|
|
|
{
|
|
|
|
|
public override LocalisableString Map(ScoreRank value)
|
|
|
|
|
{
|
|
|
|
|
switch (value)
|
|
|
|
|
{
|
|
|
|
|
case ScoreRank.XH:
|
|
|
|
|
return BeatmapsStrings.RankXH;
|
|
|
|
|
|
|
|
|
|
case ScoreRank.X:
|
|
|
|
|
return BeatmapsStrings.RankX;
|
|
|
|
|
|
|
|
|
|
case ScoreRank.SH:
|
|
|
|
|
return BeatmapsStrings.RankSH;
|
|
|
|
|
|
|
|
|
|
case ScoreRank.S:
|
|
|
|
|
return BeatmapsStrings.RankS;
|
|
|
|
|
|
|
|
|
|
case ScoreRank.A:
|
|
|
|
|
return BeatmapsStrings.RankA;
|
|
|
|
|
|
|
|
|
|
case ScoreRank.B:
|
|
|
|
|
return BeatmapsStrings.RankB;
|
|
|
|
|
|
|
|
|
|
case ScoreRank.C:
|
|
|
|
|
return BeatmapsStrings.RankC;
|
|
|
|
|
|
|
|
|
|
case ScoreRank.D:
|
|
|
|
|
return BeatmapsStrings.RankD;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
throw new ArgumentOutOfRangeException(nameof(value), value, null);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|