1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 02:17:46 +08:00

Remove redundant context menu container

This commit is contained in:
Joseph Madamba 2022-12-26 15:38:07 -08:00
parent 84e3858a86
commit 8bc8b0d0af

View File

@ -9,7 +9,6 @@ using osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Colour;
using osu.Game.Graphics.Cursor;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Localisation; using osu.Framework.Localisation;
@ -91,118 +90,113 @@ namespace osu.Game.Overlays.BeatmapSet
}, },
}, },
}, },
new OsuContextMenuContainer new Container
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
Child = new Container Padding = new MarginPadding
{ {
RelativeSizeAxes = Axes.X, Vertical = BeatmapSetOverlay.Y_PADDING,
AutoSizeAxes = Axes.Y, Left = BeatmapSetOverlay.X_PADDING,
Padding = new MarginPadding Right = BeatmapSetOverlay.X_PADDING + BeatmapSetOverlay.RIGHT_WIDTH,
},
Children = new Drawable[]
{
fadeContent = new FillFlowContainer
{ {
Vertical = BeatmapSetOverlay.Y_PADDING, RelativeSizeAxes = Axes.X,
Left = BeatmapSetOverlay.X_PADDING, AutoSizeAxes = Axes.Y,
Right = BeatmapSetOverlay.X_PADDING + BeatmapSetOverlay.RIGHT_WIDTH, Direction = FillDirection.Vertical,
}, Children = new Drawable[]
Children = new Drawable[]
{
fadeContent = new FillFlowContainer
{ {
RelativeSizeAxes = Axes.X, new Container
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Vertical,
Children = new Drawable[]
{ {
new Container RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Child = Picker = new BeatmapPicker(),
},
new FillFlowContainer
{
Direction = FillDirection.Horizontal,
AutoSizeAxes = Axes.Both,
Margin = new MarginPadding { Top = 15 },
Children = new Drawable[]
{ {
RelativeSizeAxes = Axes.X, title = new OsuSpriteText
AutoSizeAxes = Axes.Y,
Child = Picker = new BeatmapPicker(),
},
new FillFlowContainer
{
Direction = FillDirection.Horizontal,
AutoSizeAxes = Axes.Both,
Margin = new MarginPadding { Top = 15 },
Children = new Drawable[]
{ {
title = new OsuSpriteText Font = OsuFont.GetFont(size: 30, weight: FontWeight.SemiBold, italics: true)
{ },
Font = OsuFont.GetFont(size: 30, weight: FontWeight.SemiBold, italics: true) externalLink = new ExternalLinkButton
}, {
externalLink = new ExternalLinkButton Anchor = Anchor.BottomLeft,
{ Origin = Anchor.BottomLeft,
Anchor = Anchor.BottomLeft, Margin = new MarginPadding { Left = 5, Bottom = 4 }, // To better lineup with the font
Origin = Anchor.BottomLeft, },
Margin = new MarginPadding { Left = 5, Bottom = 4 }, // To better lineup with the font explicitContent = new ExplicitContentBeatmapBadge
}, {
explicitContent = new ExplicitContentBeatmapBadge Alpha = 0f,
{ Anchor = Anchor.BottomLeft,
Alpha = 0f, Origin = Anchor.BottomLeft,
Anchor = Anchor.BottomLeft, Margin = new MarginPadding { Left = 10, Bottom = 4 },
Origin = Anchor.BottomLeft, },
Margin = new MarginPadding { Left = 10, Bottom = 4 }, spotlight = new SpotlightBeatmapBadge
}, {
spotlight = new SpotlightBeatmapBadge Alpha = 0f,
{ Anchor = Anchor.BottomLeft,
Alpha = 0f, Origin = Anchor.BottomLeft,
Anchor = Anchor.BottomLeft, Margin = new MarginPadding { Left = 10, Bottom = 4 },
Origin = Anchor.BottomLeft,
Margin = new MarginPadding { Left = 10, Bottom = 4 },
}
} }
}, }
new FillFlowContainer },
new FillFlowContainer
{
Direction = FillDirection.Horizontal,
AutoSizeAxes = Axes.Both,
Margin = new MarginPadding { Bottom = 20 },
Children = new Drawable[]
{ {
Direction = FillDirection.Horizontal, artist = new OsuSpriteText
AutoSizeAxes = Axes.Both,
Margin = new MarginPadding { Bottom = 20 },
Children = new Drawable[]
{ {
artist = new OsuSpriteText Font = OsuFont.GetFont(size: 20, weight: FontWeight.Medium, italics: true),
{ },
Font = OsuFont.GetFont(size: 20, weight: FontWeight.Medium, italics: true), featuredArtist = new FeaturedArtistBeatmapBadge
}, {
featuredArtist = new FeaturedArtistBeatmapBadge Alpha = 0f,
{ Anchor = Anchor.BottomLeft,
Alpha = 0f, Origin = Anchor.BottomLeft,
Anchor = Anchor.BottomLeft, Margin = new MarginPadding { Left = 10 }
Origin = Anchor.BottomLeft,
Margin = new MarginPadding { Left = 10 }
}
} }
}, }
new Container },
new Container
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Child = author = new AuthorInfo(),
},
beatmapAvailability = new BeatmapAvailability(),
new Container
{
RelativeSizeAxes = Axes.X,
Height = buttons_height,
Margin = new MarginPadding { Top = 10 },
Children = new Drawable[]
{ {
RelativeSizeAxes = Axes.X, favouriteButton = new FavouriteButton
AutoSizeAxes = Axes.Y,
Child = author = new AuthorInfo(),
},
beatmapAvailability = new BeatmapAvailability(),
new Container
{
RelativeSizeAxes = Axes.X,
Height = buttons_height,
Margin = new MarginPadding { Top = 10 },
Children = new Drawable[]
{ {
favouriteButton = new FavouriteButton BeatmapSet = { BindTarget = BeatmapSet }
{ },
BeatmapSet = { BindTarget = BeatmapSet } downloadButtonsContainer = new FillFlowContainer
}, {
downloadButtonsContainer = new FillFlowContainer RelativeSizeAxes = Axes.Both,
{ Padding = new MarginPadding { Left = buttons_height + buttons_spacing },
RelativeSizeAxes = Axes.Both, Spacing = new Vector2(buttons_spacing),
Padding = new MarginPadding { Left = buttons_height + buttons_spacing },
Spacing = new Vector2(buttons_spacing),
},
}, },
}, },
}, },
}, },
} },
}, }
}, },
loading = new LoadingSpinner loading = new LoadingSpinner
{ {