2020-10-28 01:13:18 +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;
|
2020-10-28 07:28:31 +08:00
|
|
|
|
using System.ComponentModel;
|
2021-06-16 14:58:07 +08:00
|
|
|
|
using osu.Framework.Localisation;
|
|
|
|
|
using osu.Game.Resources.Localisation.Web;
|
2020-10-28 07:28:31 +08:00
|
|
|
|
|
2020-10-28 01:13:18 +08:00
|
|
|
|
namespace osu.Game.Overlays.BeatmapListing
|
|
|
|
|
{
|
2021-06-16 14:58:07 +08:00
|
|
|
|
[LocalisableEnum(typeof(SearchExtraEnumLocalisationMapper))]
|
2020-10-28 01:13:18 +08:00
|
|
|
|
public enum SearchExtra
|
|
|
|
|
{
|
2020-10-28 07:28:31 +08:00
|
|
|
|
[Description("Has Video")]
|
2020-10-28 01:13:18 +08:00
|
|
|
|
Video,
|
2020-10-28 07:39:51 +08:00
|
|
|
|
|
2020-10-28 07:28:31 +08:00
|
|
|
|
[Description("Has Storyboard")]
|
2020-10-28 03:27:29 +08:00
|
|
|
|
Storyboard
|
2020-10-28 01:13:18 +08:00
|
|
|
|
}
|
2021-06-16 14:58:07 +08:00
|
|
|
|
|
|
|
|
|
public class SearchExtraEnumLocalisationMapper : EnumLocalisationMapper<SearchExtra>
|
|
|
|
|
{
|
|
|
|
|
public override LocalisableString Map(SearchExtra value)
|
|
|
|
|
{
|
|
|
|
|
switch (value)
|
|
|
|
|
{
|
|
|
|
|
case SearchExtra.Video:
|
|
|
|
|
return BeatmapsStrings.ExtraVideo;
|
|
|
|
|
|
|
|
|
|
case SearchExtra.Storyboard:
|
|
|
|
|
return BeatmapsStrings.ExtraStoryboard;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
throw new ArgumentOutOfRangeException(nameof(value), value, null);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-10-28 01:13:18 +08:00
|
|
|
|
}
|