2019-01-24 16:43:03 +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.
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
using System.ComponentModel;
|
2018-11-20 15:51:59 +08:00
|
|
|
|
using osuTK.Graphics;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
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 => OsuColour.FromHex(@"252f3a");
|
|
|
|
|
|
|
|
|
|
protected override DirectTab DefaultTab => DirectTab.Search;
|
2019-02-12 12:04:46 +08:00
|
|
|
|
protected override Drawable CreateHeaderText() => new OsuSpriteText { Text = @"osu!direct", Font = OsuFont.GetFont(size: 25) };
|
2018-04-13 17:19:50 +08:00
|
|
|
|
protected override FontAwesome Icon => FontAwesome.fa_osu_chevron_down_o;
|
|
|
|
|
|
|
|
|
|
public Header()
|
|
|
|
|
{
|
|
|
|
|
Tabs.Current.Value = DirectTab.NewestMaps;
|
|
|
|
|
Tabs.Current.TriggerChange();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum DirectTab
|
|
|
|
|
{
|
|
|
|
|
Search,
|
2019-02-28 12:31:40 +08:00
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
[Description("Newest Maps")]
|
|
|
|
|
NewestMaps = DirectSortCriteria.Ranked,
|
2019-02-28 12:31:40 +08:00
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
[Description("Top Rated")]
|
|
|
|
|
TopRated = DirectSortCriteria.Rating,
|
2019-02-28 12:31:40 +08:00
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
[Description("Most Played")]
|
|
|
|
|
MostPlayed = DirectSortCriteria.Plays,
|
|
|
|
|
}
|
|
|
|
|
}
|