2021-03-26 06:20:10 +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;
|
2021-03-26 06:20:10 +08:00
|
|
|
using System.ComponentModel;
|
2021-06-16 14:58:07 +08:00
|
|
|
using osu.Framework.Localisation;
|
|
|
|
using osu.Game.Resources.Localisation.Web;
|
2021-03-26 06:20:10 +08:00
|
|
|
|
|
|
|
namespace osu.Game.Overlays.BeatmapListing
|
|
|
|
{
|
2021-06-16 14:58:07 +08:00
|
|
|
[LocalisableEnum(typeof(SearchGeneralEnumLocalisationMapper))]
|
2021-03-26 06:20:10 +08:00
|
|
|
public enum SearchGeneral
|
|
|
|
{
|
|
|
|
[Description("Recommended difficulty")]
|
|
|
|
Recommended,
|
|
|
|
|
|
|
|
[Description("Include converted beatmaps")]
|
|
|
|
Converts,
|
|
|
|
|
|
|
|
[Description("Subscribed mappers")]
|
|
|
|
Follows
|
|
|
|
}
|
2021-06-16 14:58:07 +08:00
|
|
|
|
|
|
|
public class SearchGeneralEnumLocalisationMapper : EnumLocalisationMapper<SearchGeneral>
|
|
|
|
{
|
|
|
|
public override LocalisableString Map(SearchGeneral value)
|
|
|
|
{
|
|
|
|
switch (value)
|
|
|
|
{
|
|
|
|
case SearchGeneral.Recommended:
|
|
|
|
return BeatmapsStrings.GeneralRecommended;
|
|
|
|
|
|
|
|
case SearchGeneral.Converts:
|
|
|
|
return BeatmapsStrings.GeneralConverts;
|
|
|
|
|
|
|
|
case SearchGeneral.Follows:
|
|
|
|
return BeatmapsStrings.GeneralFollows;
|
|
|
|
|
|
|
|
default:
|
|
|
|
throw new ArgumentOutOfRangeException(nameof(value), value, null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-03-26 06:20:10 +08:00
|
|
|
}
|