2020-10-28 02:30:53 +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.
|
|
|
|
|
|
2021-06-16 14:58:07 +08:00
|
|
|
|
using System;
|
|
|
|
|
using osu.Framework.Localisation;
|
|
|
|
|
using osu.Game.Resources.Localisation.Web;
|
|
|
|
|
|
2020-10-28 02:30:53 +08:00
|
|
|
|
namespace osu.Game.Overlays.BeatmapListing
|
|
|
|
|
{
|
2021-06-16 15:19:46 +08:00
|
|
|
|
[LocalisableEnum(typeof(SearchPlayedEnumLocalisationMapper))]
|
|
|
|
|
public enum SearchPlayed
|
|
|
|
|
{
|
|
|
|
|
Any,
|
|
|
|
|
Played,
|
|
|
|
|
Unplayed
|
|
|
|
|
}
|
2021-06-16 14:58:07 +08:00
|
|
|
|
|
2021-06-16 15:19:46 +08:00
|
|
|
|
public class SearchPlayedEnumLocalisationMapper : EnumLocalisationMapper<SearchPlayed>
|
2020-10-28 02:30:53 +08:00
|
|
|
|
{
|
2021-06-16 15:19:46 +08:00
|
|
|
|
public override LocalisableString Map(SearchPlayed value)
|
2021-06-16 14:58:07 +08:00
|
|
|
|
{
|
2021-06-16 15:19:46 +08:00
|
|
|
|
switch (value)
|
|
|
|
|
{
|
|
|
|
|
case SearchPlayed.Any:
|
|
|
|
|
return BeatmapsStrings.PlayedAny;
|
2021-06-16 14:58:07 +08:00
|
|
|
|
|
2021-06-16 15:19:46 +08:00
|
|
|
|
case SearchPlayed.Played:
|
|
|
|
|
return BeatmapsStrings.PlayedPlayed;
|
2021-06-16 14:58:07 +08:00
|
|
|
|
|
2021-06-16 15:19:46 +08:00
|
|
|
|
case SearchPlayed.Unplayed:
|
|
|
|
|
return BeatmapsStrings.PlayedUnplayed;
|
2021-06-16 14:58:07 +08:00
|
|
|
|
|
2021-06-16 15:19:46 +08:00
|
|
|
|
default:
|
|
|
|
|
throw new ArgumentOutOfRangeException(nameof(value), value, null);
|
|
|
|
|
}
|
2021-06-16 14:58:07 +08:00
|
|
|
|
}
|
2020-10-28 02:30:53 +08:00
|
|
|
|
}
|
|
|
|
|
}
|