2024-07-21 02:49:46 +08: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.
|
|
|
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
|
using osu.Framework.Extensions;
|
|
|
|
|
using osu.Framework.Graphics.Cursor;
|
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
|
|
|
|
using osu.Framework.Graphics.UserInterface;
|
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
|
using osu.Game.Graphics;
|
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
|
|
|
|
using osuTK;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.Ranking
|
|
|
|
|
{
|
2024-07-28 08:20:22 +08:00
|
|
|
|
public partial class CollectionButton : GrayButton, IHasPopover
|
2024-07-21 02:49:46 +08:00
|
|
|
|
{
|
|
|
|
|
private readonly BeatmapInfo beatmapInfo;
|
|
|
|
|
|
|
|
|
|
public CollectionButton(BeatmapInfo beatmapInfo)
|
2024-07-28 08:20:22 +08:00
|
|
|
|
: base(FontAwesome.Solid.Book)
|
2024-07-21 02:49:46 +08:00
|
|
|
|
{
|
|
|
|
|
this.beatmapInfo = beatmapInfo;
|
|
|
|
|
|
2024-07-28 09:32:35 +08:00
|
|
|
|
Size = new Vector2(75, 30);
|
2024-07-21 02:49:46 +08:00
|
|
|
|
|
|
|
|
|
TooltipText = "collections";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
|
private void load(OsuColour colours)
|
|
|
|
|
{
|
2024-07-28 08:20:22 +08:00
|
|
|
|
Background.Colour = colours.Green;
|
2024-07-21 02:49:46 +08:00
|
|
|
|
|
|
|
|
|
Action = this.ShowPopover;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Popover GetPopover() => new CollectionPopover(beatmapInfo);
|
|
|
|
|
}
|
|
|
|
|
}
|