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