1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 07:32:55 +08:00

Remove unused BeatmapTypeInfo class

Helps reduce the scope of upcoming changes.
This commit is contained in:
Dean Herbert 2021-10-22 19:12:37 +09:00
parent 14a7b00f58
commit 90477e3788

View File

@ -1,72 +0,0 @@
// 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 System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osuTK;
namespace osu.Game.Screens.OnlinePlay.Components
{
public class BeatmapTypeInfo : OnlinePlayComposite
{
private LinkFlowContainer beatmapAuthor;
public BeatmapTypeInfo()
{
AutoSizeAxes = Axes.Both;
}
[BackgroundDependencyLoader]
private void load()
{
InternalChild = new FillFlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Horizontal,
LayoutDuration = 100,
Spacing = new Vector2(5, 0),
Children = new Drawable[]
{
new ModeTypeInfo(),
new Container
{
AutoSizeAxes = Axes.X,
Height = 30,
Margin = new MarginPadding { Left = 5 },
Children = new Drawable[]
{
new BeatmapTitle(),
beatmapAuthor = new LinkFlowContainer(s => s.Font = s.Font.With(size: 14))
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
AutoSizeAxes = Axes.Both
},
},
},
}
};
Playlist.CollectionChanged += (_, __) => updateInfo();
updateInfo();
}
private void updateInfo()
{
beatmapAuthor.Clear();
var beatmap = Playlist.FirstOrDefault()?.Beatmap;
if (beatmap != null)
{
beatmapAuthor.AddText("mapped by ", s => s.Colour = OsuColour.Gray(0.8f));
beatmapAuthor.AddUserLink(beatmap.Value.Metadata.Author);
}
}
}
}