1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 19:27:31 +08:00
osu-lazer/osu.Game/Overlays/Direct/Header.cs

39 lines
1.3 KiB
C#
Raw Normal View History

2018-01-05 19:21:19 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.ComponentModel;
using OpenTK.Graphics;
using osu.Framework.Graphics;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
2017-05-26 13:44:09 +08:00
using osu.Game.Overlays.SearchableList;
namespace osu.Game.Overlays.Direct
{
2017-05-26 13:44:09 +08:00
public class Header : SearchableListHeader<DirectTab>
{
protected override Color4 BackgroundColour => OsuColour.FromHex(@"252f3a");
protected override DirectTab DefaultTab => DirectTab.Search;
2017-05-26 13:16:56 +08:00
protected override Drawable CreateHeaderText() => new OsuSpriteText { Text = @"osu!direct", TextSize = 25 };
protected override FontAwesome Icon => FontAwesome.fa_osu_chevron_down_o;
public Header()
{
Tabs.Current.Value = DirectTab.NewestMaps;
2017-05-19 00:57:19 +08:00
Tabs.Current.TriggerChange();
}
}
public enum DirectTab
{
Search,
[Description("Newest Maps")]
2017-07-11 12:42:51 +08:00
NewestMaps = DirectSortCriteria.Ranked,
[Description("Top Rated")]
2017-07-11 12:42:51 +08:00
TopRated = DirectSortCriteria.Rating,
[Description("Most Played")]
2017-07-11 12:42:51 +08:00
MostPlayed = DirectSortCriteria.Plays,
}
}