// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using System.ComponentModel; using osu.Framework.Localisation; using osu.Game.Localisation; using osu.Game.Resources.Localisation.Web; namespace osu.Game.Overlays.Dashboard { public class DashboardOverlayHeader : TabControlOverlayHeader { protected override OverlayTitle CreateTitle() => new DashboardTitle(); private class DashboardTitle : OverlayTitle { public DashboardTitle() { Title = NamedOverlayComponentStrings.DashboardTitle; Description = NamedOverlayComponentStrings.DashboardDescription; IconTexture = "Icons/Hexacons/social"; } } } [LocalisableEnum(typeof(DashboardOverlayTabsEnumLocalisationMapper))] public enum DashboardOverlayTabs { Friends, [Description("Currently Playing")] CurrentlyPlaying } public class DashboardOverlayTabsEnumLocalisationMapper : EnumLocalisationMapper { public override LocalisableString Map(DashboardOverlayTabs value) { switch (value) { case DashboardOverlayTabs.Friends: return FriendsStrings.TitleCompact; case DashboardOverlayTabs.CurrentlyPlaying: return @"Currently Playing"; default: throw new ArgumentOutOfRangeException(nameof(value), value, null); } } } }