1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 04:07:25 +08:00
osu-lazer/osu.Game/Overlays/Social/Header.cs

65 lines
1.9 KiB
C#
Raw Normal View History

// 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 osu.Game.Overlays.SearchableList;
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.Sprites;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Framework.Allocation;
using System.ComponentModel;
namespace osu.Game.Overlays.Social
{
public class Header : SearchableListHeader<SocialTab>
{
private OsuSpriteText browser;
protected override Color4 BackgroundColour => OsuColour.FromHex(@"38202e");
protected override SocialTab DefaultTab => SocialTab.AllPlayers;
protected override FontAwesome Icon => FontAwesome.fa_users;
protected override Drawable CreateHeaderText()
{
return new FillFlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Horizontal,
Children = new[]
{
new OsuSpriteText
{
Text = "social ",
Font = OsuFont.GetFont(size: 25),
2018-04-13 17:19:50 +08:00
},
browser = new OsuSpriteText
{
Text = "browser",
Font = OsuFont.GetFont(size: 25, weight: FontWeight.Light),
2018-04-13 17:19:50 +08:00
},
},
};
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
browser.Colour = colours.Pink;
}
}
public enum SocialTab
{
[Description("All Players")]
AllPlayers,
[Description("Friends")]
Friends,
//[Description("Team Members")]
//TeamMembers,
//[Description("Chat Channels")]
//ChatChannels,
}
}