2019-01-28 06:45:00 +08: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.
|
2019-01-11 08:12:19 +08:00
|
|
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
2019-03-10 06:58:14 +08:00
|
|
|
|
using osu.Framework.Bindables;
|
2019-01-11 08:12:19 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
using osu.Framework.Graphics.Shapes;
|
2019-04-26 12:49:44 +08:00
|
|
|
|
using osu.Game.Overlays.Profile.Header.Components;
|
2019-01-11 08:12:19 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.Profile.Header
|
|
|
|
|
{
|
2022-11-24 13:32:20 +08:00
|
|
|
|
public partial class DetailHeaderContainer : CompositeDrawable
|
2019-01-11 08:12:19 +08:00
|
|
|
|
{
|
2023-01-11 02:24:54 +08:00
|
|
|
|
public readonly Bindable<UserProfileData?> User = new Bindable<UserProfileData?>();
|
2019-01-11 08:12:19 +08:00
|
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
2023-01-01 00:51:58 +08:00
|
|
|
|
private void load(OverlayColourProvider colourProvider)
|
2019-01-11 08:12:19 +08:00
|
|
|
|
{
|
2019-03-10 06:58:14 +08:00
|
|
|
|
AutoSizeAxes = Axes.Y;
|
2019-05-04 10:01:12 +08:00
|
|
|
|
|
2019-03-10 06:58:14 +08:00
|
|
|
|
InternalChildren = new Drawable[]
|
2019-01-11 08:12:19 +08:00
|
|
|
|
{
|
|
|
|
|
new Box
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
2020-01-30 05:10:58 +08:00
|
|
|
|
Colour = colourProvider.Background5,
|
2019-01-11 08:12:19 +08:00
|
|
|
|
},
|
2023-01-01 02:00:40 +08:00
|
|
|
|
new Container
|
2019-01-11 08:12:19 +08:00
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.X,
|
2023-01-01 02:00:40 +08:00
|
|
|
|
AutoSizeAxes = Axes.Y,
|
|
|
|
|
Padding = new MarginPadding { Horizontal = UserProfileOverlay.CONTENT_X_MARGIN, Vertical = 10 },
|
|
|
|
|
Child = new GridContainer
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
|
AutoSizeAxes = Axes.Y,
|
|
|
|
|
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 }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-01-01 01:39:36 +08:00
|
|
|
|
}
|
2019-01-11 08:12:19 +08:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|