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