mirror of
https://github.com/ppy/osu.git
synced 2026-05-25 09:10:26 +08:00
78 lines
2.8 KiB
C#
78 lines
2.8 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.Framework.Graphics.Shapes;
|
|
using osu.Framework.Graphics.Sprites;
|
|
using osu.Game.Graphics.Sprites;
|
|
using osu.Game.Overlays;
|
|
using osuTK;
|
|
|
|
namespace osu.Game.Screens.OnlinePlay.Matchmaking.Match.BeatmapSelect
|
|
{
|
|
public partial class BeatmapCardMatchmakingRandomContent : BeatmapCardMatchmakingContent
|
|
{
|
|
public override AvatarOverlay SelectionOverlay => selectionOverlay;
|
|
|
|
[Resolved]
|
|
private OverlayColourProvider colourProvider { get; set; } = null!;
|
|
|
|
private AvatarOverlay selectionOverlay = null!;
|
|
|
|
[BackgroundDependencyLoader]
|
|
private void load()
|
|
{
|
|
InternalChildren = new Drawable[]
|
|
{
|
|
new Box
|
|
{
|
|
RelativeSizeAxes = Axes.Both,
|
|
Colour = colourProvider.Background2,
|
|
},
|
|
new Container
|
|
{
|
|
RelativeSizeAxes = Axes.Both,
|
|
Padding = new MarginPadding
|
|
{
|
|
Horizontal = 10,
|
|
Vertical = 4
|
|
},
|
|
Children = new Drawable[]
|
|
{
|
|
new FillFlowContainer
|
|
{
|
|
Anchor = Anchor.Centre,
|
|
Origin = Anchor.Centre,
|
|
AutoSizeAxes = Axes.Both,
|
|
Direction = FillDirection.Vertical,
|
|
Children =
|
|
[
|
|
new SpriteIcon
|
|
{
|
|
Anchor = Anchor.TopCentre,
|
|
Origin = Anchor.TopCentre,
|
|
Size = new Vector2(32),
|
|
Icon = FontAwesome.Solid.Random,
|
|
},
|
|
new OsuSpriteText
|
|
{
|
|
Anchor = Anchor.TopCentre,
|
|
Origin = Anchor.TopCentre,
|
|
Text = "Random",
|
|
}
|
|
]
|
|
},
|
|
selectionOverlay = new AvatarOverlay
|
|
{
|
|
Anchor = Anchor.TopRight,
|
|
Origin = Anchor.TopRight,
|
|
}
|
|
}
|
|
}
|
|
};
|
|
}
|
|
}
|
|
}
|