mirror of
https://github.com/ppy/osu.git
synced 2026-05-22 00:30:45 +08:00
054ae2983d
This PR extracts the classes used for the actions dropdown on the user profile overlay to separate components, in preparation to be used on the team overlay (#32584). Kinda RFC since I'm not sure if this is the best way to do this. Co-authored-by: Dean Herbert <pe@ppy.sh>
41 lines
1.2 KiB
C#
41 lines
1.2 KiB
C#
// 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;
|
|
using osu.Framework.Graphics;
|
|
using osu.Framework.Graphics.Containers;
|
|
using osu.Game.Graphics.UserInterfaceV2;
|
|
|
|
namespace osu.Game.Overlays.Profile.Header.Components
|
|
{
|
|
public abstract partial class ProfileActionPopover : OsuPopover
|
|
{
|
|
[Resolved]
|
|
private OverlayColourProvider colourProvider { get; set; } = null!;
|
|
|
|
private FillFlowContainer container = null!;
|
|
|
|
protected ProfileActionPopover()
|
|
: base(false)
|
|
{
|
|
}
|
|
|
|
[BackgroundDependencyLoader]
|
|
private void load()
|
|
{
|
|
Background.Colour = colourProvider.Background6;
|
|
|
|
AllowableAnchors = [Anchor.BottomCentre, Anchor.TopCentre];
|
|
|
|
Child = container = new FillFlowContainer
|
|
{
|
|
Width = 160,
|
|
AutoSizeAxes = Axes.Y,
|
|
Padding = new MarginPadding { Horizontal = 5, Vertical = 10 },
|
|
};
|
|
}
|
|
|
|
public ProfilePopoverAction[] Actions { set => container.Children = value; }
|
|
}
|
|
}
|