1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-06 09:47:22 +08:00

39 lines
1.1 KiB
C#
Raw Normal View History

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