2017-05-17 08:58:34 +00:00
|
|
|
|
// Copyright (c) 2007-2017 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 05:44:09 +00:00
|
|
|
|
using osu.Game.Overlays.SearchableList;
|
2017-05-17 08:58:34 +00:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.Direct
|
|
|
|
|
{
|
2017-05-26 05:44:09 +00:00
|
|
|
|
public class Header : SearchableListHeader<DirectTab>
|
2017-05-17 08:58:34 +00:00
|
|
|
|
{
|
2017-05-26 03:52:01 +00:00
|
|
|
|
protected override Color4 BackgroundColour => OsuColour.FromHex(@"252f3a");
|
|
|
|
|
protected override float TabStripWidth => 298;
|
2017-05-17 08:58:34 +00:00
|
|
|
|
|
2017-05-26 03:52:01 +00:00
|
|
|
|
protected override DirectTab DefaultTab => DirectTab.Search;
|
2017-05-26 05:16:56 +00:00
|
|
|
|
protected override Drawable CreateHeaderText() => new OsuSpriteText { Text = @"osu!direct", TextSize = 25 };
|
2017-06-07 11:06:02 +00:00
|
|
|
|
protected override FontAwesome Icon => FontAwesome.fa_osu_chevron_down_o;
|
2017-05-17 08:58:34 +00:00
|
|
|
|
|
|
|
|
|
public Header()
|
|
|
|
|
{
|
2017-09-27 04:23:48 +00:00
|
|
|
|
Tabs.Current.Value = DirectTab.NewestMaps;
|
2017-05-18 16:57:19 +00:00
|
|
|
|
Tabs.Current.TriggerChange();
|
2017-05-17 08:58:34 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum DirectTab
|
|
|
|
|
{
|
|
|
|
|
Search,
|
|
|
|
|
[Description("Newest Maps")]
|
2017-07-11 04:42:51 +00:00
|
|
|
|
NewestMaps = DirectSortCriteria.Ranked,
|
2017-05-17 08:58:34 +00:00
|
|
|
|
[Description("Top Rated")]
|
2017-07-11 04:42:51 +00:00
|
|
|
|
TopRated = DirectSortCriteria.Rating,
|
2017-05-17 08:58:34 +00:00
|
|
|
|
[Description("Most Played")]
|
2017-07-11 04:42:51 +00:00
|
|
|
|
MostPlayed = DirectSortCriteria.Plays,
|
2017-05-17 08:58:34 +00:00
|
|
|
|
}
|
|
|
|
|
}
|