1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-12 13:17:26 +08:00
osu-lazer/osu.Game/Users/Profile/ProfileSection.cs

60 lines
1.9 KiB
C#
Raw Normal View History

2017-05-25 02:11:07 +08:00
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2017-06-09 15:22:07 +08:00
using OpenTK;
2017-06-09 14:53:00 +08:00
using osu.Framework.Graphics;
2017-05-25 02:11:07 +08:00
using osu.Framework.Graphics.Containers;
2017-06-09 14:53:00 +08:00
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
2017-05-25 02:11:07 +08:00
2017-06-05 21:07:57 +08:00
namespace osu.Game.Users.Profile
2017-05-25 02:11:07 +08:00
{
2017-06-09 14:53:00 +08:00
public abstract class ProfileSection : FillFlowContainer
2017-05-25 02:11:07 +08:00
{
public abstract string Title { get; }
2017-06-09 15:22:07 +08:00
private readonly FillFlowContainer content;
protected override Container<Drawable> Content => content;
2017-06-09 14:53:00 +08:00
protected ProfileSection()
2017-05-25 02:11:07 +08:00
{
2017-06-09 14:53:00 +08:00
Direction = FillDirection.Vertical;
AutoSizeAxes = Axes.Y;
RelativeSizeAxes = Axes.X;
2017-06-09 15:22:07 +08:00
InternalChildren = new Drawable[]
2017-06-09 14:53:00 +08:00
{
new OsuSpriteText
{
Text = Title,
2017-06-15 07:23:30 +08:00
TextSize = 20,
2017-06-09 14:53:00 +08:00
Font = @"Exo2.0-RegularItalic",
2017-06-09 15:22:07 +08:00
Margin = new MarginPadding
{
Horizontal = UserProfile.CONTENT_X_MARGIN,
Vertical = 20
}
},
content = new FillFlowContainer
{
Direction = FillDirection.Vertical,
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Margin = new MarginPadding
{
Horizontal = UserProfile.CONTENT_X_MARGIN,
Bottom = 20
}
2017-06-09 14:53:00 +08:00
},
new Box
{
RelativeSizeAxes = Axes.X,
Height = 1,
Colour = OsuColour.Gray(34),
2017-06-09 15:22:07 +08:00
EdgeSmoothness = new Vector2(1)
2017-06-09 14:53:00 +08:00
}
};
2017-05-25 02:11:07 +08:00
}
}
}