1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-18 00:23:22 +08:00
osu-lazer/osu.Game/Overlays/Dashboard/Friends/OnlineStatus.cs

39 lines
1.1 KiB
C#
Raw Normal View History

2020-03-23 09:47:27 +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.
using System;
using osu.Framework.Localisation;
using osu.Game.Resources.Localisation.Web;
2020-03-23 09:47:27 +08:00
namespace osu.Game.Overlays.Dashboard.Friends
{
[LocalisableEnum(typeof(OnlineStatusEnumLocalisationMapper))]
2020-03-23 09:47:27 +08:00
public enum OnlineStatus
{
All,
Online,
Offline
}
public class OnlineStatusEnumLocalisationMapper : EnumLocalisationMapper<OnlineStatus>
{
public override LocalisableString Map(OnlineStatus value)
{
switch (value)
{
case OnlineStatus.All:
return SortStrings.All;
case OnlineStatus.Online:
return UsersStrings.StatusOnline;
case OnlineStatus.Offline:
return UsersStrings.StatusOffline;
default:
throw new ArgumentOutOfRangeException(nameof(value), value, null);
}
}
}
2020-03-23 09:47:27 +08:00
}