2020-10-27 17:13:18 +00: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 06:58:07 +00:00
|
|
|
|
using System;
|
2020-10-27 23:28:31 +00:00
|
|
|
|
using System.ComponentModel;
|
2021-06-16 06:58:07 +00:00
|
|
|
|
using osu.Framework.Localisation;
|
|
|
|
|
using osu.Game.Resources.Localisation.Web;
|
2020-10-27 23:28:31 +00:00
|
|
|
|
|
2020-10-27 17:13:18 +00:00
|
|
|
|
namespace osu.Game.Overlays.BeatmapListing
|
|
|
|
|
{
|
2021-06-16 06:58:07 +00:00
|
|
|
|
[LocalisableEnum(typeof(SearchExtraEnumLocalisationMapper))]
|
2020-10-27 17:13:18 +00:00
|
|
|
|
public enum SearchExtra
|
|
|
|
|
{
|
2020-10-27 23:28:31 +00:00
|
|
|
|
[Description("Has Video")]
|
2020-10-27 17:13:18 +00:00
|
|
|
|
Video,
|
2020-10-27 23:39:51 +00:00
|
|
|
|
|
2020-10-27 23:28:31 +00:00
|
|
|
|
[Description("Has Storyboard")]
|
2020-10-27 19:27:29 +00:00
|
|
|
|
Storyboard
|
2020-10-27 17:13:18 +00:00
|
|
|
|
}
|
2021-06-16 06:58:07 +00: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-27 17:13:18 +00:00
|
|
|
|
}
|