2019-01-24 16:43:03 +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.
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2021-08-07 20:19:05 +08:00
|
|
|
|
using osu.Framework.Allocation;
|
2017-06-12 17:56:07 +08:00
|
|
|
|
using osu.Framework.Graphics.Cursor;
|
|
|
|
|
using osu.Framework.Graphics.UserInterface;
|
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2017-06-12 17:56:07 +08:00
|
|
|
|
namespace osu.Game.Graphics.Cursor
|
|
|
|
|
{
|
2024-08-06 15:02:36 +08:00
|
|
|
|
[Cached(typeof(OsuContextMenuContainer))]
|
2017-08-28 13:42:52 +08:00
|
|
|
|
public partial class OsuContextMenuContainer : ContextMenuContainer
|
2017-06-12 17:56:07 +08:00
|
|
|
|
{
|
2021-08-07 20:19:05 +08:00
|
|
|
|
[Cached]
|
|
|
|
|
private OsuContextMenuSamples samples = new OsuContextMenuSamples();
|
|
|
|
|
|
2024-08-04 21:00:43 +08:00
|
|
|
|
private OsuContextMenu menu = null!;
|
|
|
|
|
|
2024-08-06 12:37:46 +08:00
|
|
|
|
public OsuContextMenuContainer()
|
|
|
|
|
{
|
|
|
|
|
AddInternal(samples);
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-06 14:17:52 +08:00
|
|
|
|
protected override Menu CreateMenu() => menu = new OsuContextMenu(true);
|
|
|
|
|
|
2024-08-04 21:00:43 +08:00
|
|
|
|
public void CloseMenu()
|
|
|
|
|
{
|
|
|
|
|
menu.Close();
|
|
|
|
|
}
|
2017-06-12 17:56:07 +08:00
|
|
|
|
}
|
2018-01-05 19:21:19 +08:00
|
|
|
|
}
|