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.
|
2019-01-11 00:12:19 +00:00
|
|
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
2019-03-09 22:58:14 +00:00
|
|
|
|
using osu.Framework.Bindables;
|
2019-01-11 00:12:19 +00:00
|
|
|
|
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;
|
2019-01-11 00:12:19 +00:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.Profile.Header
|
|
|
|
|
{
|
2019-03-09 22:58:14 +00:00
|
|
|
|
public partial class DetailHeaderContainer : CompositeDrawable
|
2019-01-11 00:12:19 +00:00
|
|
|
|
{
|
2023-01-10 18:24:54 +00:00
|
|
|
|
public readonly Bindable<UserProfileData?> User = new Bindable<UserProfileData?>();
|
2019-01-11 00:12:19 +00:00
|
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
2022-12-31 16:51:58 +00:00
|
|
|
|
private void load(OverlayColourProvider colourProvider)
|
2019-01-11 00:12:19 +00:00
|
|
|
|
{
|
2019-03-09 22:58:14 +00:00
|
|
|
|
AutoSizeAxes = Axes.Y;
|
2019-05-04 02:01:12 +00:00
|
|
|
|
|
2019-03-09 22:58:14 +00:00
|
|
|
|
InternalChildren = new Drawable[]
|
2019-01-11 00:12:19 +00:00
|
|
|
|
{
|
|
|
|
|
new Box
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
2020-01-29 21:10:58 +00:00
|
|
|
|
Colour = colourProvider.Background5,
|
2019-01-11 00:12:19 +00:00
|
|
|
|
},
|
2024-02-20 20:18:37 +00:00
|
|
|
|
new GridContainer
|
2019-01-11 00:12:19 +00:00
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.X,
|
2022-12-31 18:00:40 +00:00
|
|
|
|
AutoSizeAxes = Axes.Y,
|
2023-04-03 00:11:19 +00:00
|
|
|
|
Padding = new MarginPadding { Horizontal = WaveOverlayContainer.HORIZONTAL_PADDING, Vertical = 10 },
|
2024-02-20 20:18:37 +00:00
|
|
|
|
RowDimensions = new[]
|
2022-12-31 18:00:40 +00:00
|
|
|
|
{
|
2024-02-20 20:18:37 +00:00
|
|
|
|
new Dimension(GridSizeMode.AutoSize),
|
|
|
|
|
},
|
|
|
|
|
ColumnDimensions = new[]
|
|
|
|
|
{
|
|
|
|
|
new Dimension(),
|
|
|
|
|
new Dimension(GridSizeMode.AutoSize),
|
|
|
|
|
new Dimension(GridSizeMode.AutoSize),
|
|
|
|
|
},
|
|
|
|
|
Content = new[]
|
|
|
|
|
{
|
|
|
|
|
new Drawable[]
|
2022-12-31 18:00:40 +00:00
|
|
|
|
{
|
2024-02-20 20:18:37 +00:00
|
|
|
|
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
|
2022-12-31 18:00:40 +00:00
|
|
|
|
{
|
2024-02-20 20:18:37 +00:00
|
|
|
|
Anchor = Anchor.CentreLeft,
|
|
|
|
|
Origin = Anchor.CentreLeft,
|
|
|
|
|
User = { BindTarget = User }
|
2022-12-31 18:00:40 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-12-31 17:39:36 +00:00
|
|
|
|
}
|
2019-01-11 00:12:19 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|