osu/osu.Game/Overlays/Profile/Header/DetailHeaderContainer.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

73 lines
2.6 KiB
C#
Raw Normal View History

2019-01-27 22:45:00 +00: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.
using osu.Framework.Allocation;
2019-03-09 22:58:14 +00:00
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
2019-04-26 04:49:44 +00:00
using osu.Game.Overlays.Profile.Header.Components;
namespace osu.Game.Overlays.Profile.Header
{
2019-03-09 22:58:14 +00:00
public partial class DetailHeaderContainer : CompositeDrawable
{
2023-01-10 18:24:54 +00:00
public readonly Bindable<UserProfileData?> User = new Bindable<UserProfileData?>();
[BackgroundDependencyLoader]
private void load(OverlayColourProvider colourProvider)
{
2019-03-09 22:58:14 +00:00
AutoSizeAxes = Axes.Y;
2019-03-09 22:58:14 +00:00
InternalChildren = new Drawable[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
2020-01-29 21:10:58 +00:00
Colour = colourProvider.Background5,
},
new GridContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Padding = new MarginPadding { Horizontal = WaveOverlayContainer.HORIZONTAL_PADDING, Vertical = 10 },
RowDimensions = new[]
{
new Dimension(GridSizeMode.AutoSize),
},
ColumnDimensions = new[]
{
new Dimension(),
new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.AutoSize),
},
Content = new[]
{
new Drawable[]
{
new MainDetails
{
RelativeSizeAxes = Axes.X,
User = { BindTarget = User }
},
new Box
{
RelativeSizeAxes = Axes.Y,
Width = 2,
Colour = colourProvider.Background6,
Margin = new MarginPadding { Horizontal = 15 }
},
new ExtendedDetails
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
User = { BindTarget = User }
}
}
}
}
};
}
}
}