mirror of
https://github.com/ppy/osu.git
synced 2024-12-21 10:32:55 +08:00
44 lines
1.3 KiB
C#
44 lines
1.3 KiB
C#
// 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.ComponentModel;
|
|
using osu.Framework.Extensions.Color4Extensions;
|
|
using osuTK.Graphics;
|
|
using osu.Framework.Graphics;
|
|
using osu.Framework.Graphics.Sprites;
|
|
using osu.Game.Graphics;
|
|
using osu.Game.Graphics.Sprites;
|
|
using osu.Game.Overlays.SearchableList;
|
|
|
|
namespace osu.Game.Overlays.Direct
|
|
{
|
|
public class Header : SearchableListHeader<DirectTab>
|
|
{
|
|
protected override Color4 BackgroundColour => Color4Extensions.FromHex(@"252f3a");
|
|
|
|
protected override DirectTab DefaultTab => DirectTab.Search;
|
|
protected override Drawable CreateHeaderText() => new OsuSpriteText { Text = @"osu!direct", Font = OsuFont.GetFont(size: 25) };
|
|
protected override IconUsage Icon => OsuIcon.ChevronDownCircle;
|
|
|
|
public Header()
|
|
{
|
|
Tabs.Current.Value = DirectTab.NewestMaps;
|
|
Tabs.Current.TriggerChange();
|
|
}
|
|
}
|
|
|
|
public enum DirectTab
|
|
{
|
|
Search,
|
|
|
|
[Description("Newest Maps")]
|
|
NewestMaps = DirectSortCriteria.Ranked,
|
|
|
|
[Description("Top Rated")]
|
|
TopRated = DirectSortCriteria.Rating,
|
|
|
|
[Description("Most Played")]
|
|
MostPlayed = DirectSortCriteria.Plays,
|
|
}
|
|
}
|