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

68 lines
2.0 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;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics.Sprites;
2018-04-13 17:19:50 +08:00
namespace osu.Game.Overlays.Social
{
public class Header : SearchableListHeader<SocialTab>
{
private OsuSpriteText browser;
protected override Color4 BackgroundColour => Color4Extensions.FromHex(@"38202e");
2018-04-13 17:19:50 +08:00
protected override SocialTab DefaultTab => SocialTab.AllPlayers;
2019-04-02 18:55:24 +08:00
protected override IconUsage Icon => FontAwesome.Solid.Users;
2018-04-13 17:19:50 +08:00
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,
2019-02-28 12:31:40 +08:00
2018-04-13 17:19:50 +08:00
[Description("Friends")]
Friends,
//[Description("Team Members")]
//TeamMembers,
//[Description("Chat Channels")]
//ChatChannels,
}
}