2020-04-16 16:01:36 +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-07-01 02:28:27 +08:00
|
|
|
|
using System;
|
2020-10-28 16:19:14 +08:00
|
|
|
|
using System.ComponentModel;
|
2021-07-01 02:28:27 +08:00
|
|
|
|
using osu.Framework.Localisation;
|
|
|
|
|
using osu.Game.Resources.Localisation.Web;
|
2020-10-28 16:19:14 +08:00
|
|
|
|
|
2020-04-16 16:01:36 +08:00
|
|
|
|
namespace osu.Game.Overlays.Dashboard
|
|
|
|
|
{
|
2020-04-16 17:05:51 +08:00
|
|
|
|
public class DashboardOverlayHeader : TabControlOverlayHeader<DashboardOverlayTabs>
|
2020-04-16 16:01:36 +08:00
|
|
|
|
{
|
|
|
|
|
protected override OverlayTitle CreateTitle() => new DashboardTitle();
|
|
|
|
|
|
|
|
|
|
private class DashboardTitle : OverlayTitle
|
|
|
|
|
{
|
|
|
|
|
public DashboardTitle()
|
|
|
|
|
{
|
2021-07-01 02:28:27 +08:00
|
|
|
|
Title = HomeStrings.UserTitle;
|
2020-09-07 01:13:06 +08:00
|
|
|
|
Description = "view your friends and other information";
|
2020-09-03 15:26:09 +08:00
|
|
|
|
IconTexture = "Icons/Hexacons/social";
|
2020-04-16 16:01:36 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-01 02:28:27 +08:00
|
|
|
|
[LocalisableEnum(typeof(DashboardOverlayTabsEnumLocalisationMapper))]
|
2020-04-16 17:05:51 +08:00
|
|
|
|
public enum DashboardOverlayTabs
|
2020-04-16 16:01:36 +08:00
|
|
|
|
{
|
2020-10-28 16:19:14 +08:00
|
|
|
|
Friends,
|
|
|
|
|
|
|
|
|
|
[Description("Currently Playing")]
|
|
|
|
|
CurrentlyPlaying
|
2020-04-16 16:01:36 +08:00
|
|
|
|
}
|
2021-07-01 02:28:27 +08:00
|
|
|
|
|
|
|
|
|
public class DashboardOverlayTabsEnumLocalisationMapper : EnumLocalisationMapper<DashboardOverlayTabs>
|
|
|
|
|
{
|
|
|
|
|
public override LocalisableString Map(DashboardOverlayTabs value)
|
|
|
|
|
{
|
|
|
|
|
switch (value)
|
|
|
|
|
{
|
|
|
|
|
case DashboardOverlayTabs.Friends:
|
2021-07-01 16:25:47 +08:00
|
|
|
|
return FriendsStrings.TitleCompact;
|
2021-07-01 02:28:27 +08:00
|
|
|
|
|
|
|
|
|
case DashboardOverlayTabs.CurrentlyPlaying:
|
|
|
|
|
return @"Currently Playing";
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
throw new ArgumentOutOfRangeException(nameof(value), value, null);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-04-16 16:01:36 +08:00
|
|
|
|
}
|