1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 08:12:56 +08:00

Add context menu to beatmap difficulty (wip)

This commit is contained in:
Dean Herbert 2017-08-30 20:41:53 +09:00
parent 07da29ea1c
commit 8619f28ced

View File

@ -5,6 +5,7 @@ using System;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
using osu.Game.Graphics.Backgrounds;
@ -14,16 +15,19 @@ using OpenTK.Graphics;
using osu.Framework.Input;
using osu.Game.Graphics.Sprites;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.UserInterface;
namespace osu.Game.Beatmaps.Drawables
{
public class BeatmapPanel : Panel
public class BeatmapPanel : Panel, IHasContextMenu
{
public BeatmapInfo Beatmap;
private readonly Sprite background;
public Action<BeatmapPanel> GainedSelection;
public Action<BeatmapPanel> StartRequested;
public Action<BeatmapInfo> DeleteRequested;
private readonly Triangles triangles;
private readonly StarCounter starCounter;
@ -148,5 +152,12 @@ namespace osu.Game.Beatmaps.Drawables
}
};
}
public MenuItem[] ContextMenuItems => new MenuItem[]
{
new OsuMenuItem("Play", MenuItemType.Highlighted),
new OsuMenuItem("Edit"),
new OsuMenuItem("Delete", MenuItemType.Destructive),
};
}
}