···11+// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
22+// See the LICENCE file in the repository root for full licence text.
33+44+using osu.Framework.Graphics.UserInterface;
55+66+namespace osu.Framework.Graphics.Cursor
77+{
88+ public class BasicContextMenuContainer : ContextMenuContainer
99+ {
1010+ protected override Menu CreateMenu() => new BasicMenu(Direction.Vertical);
1111+ }
1212+}
+41
osu.Framework/Graphics/UserInterface/BasicMenu.cs
···11+// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
22+// See the LICENCE file in the repository root for full licence text.
33+44+using osu.Framework.Graphics.Sprites;
55+66+namespace osu.Framework.Graphics.UserInterface
77+{
88+ public class BasicMenu : Menu
99+ {
1010+ public BasicMenu(Direction direction, bool topLevelMenu = false)
1111+ : base(direction, topLevelMenu)
1212+ {
1313+ BackgroundColour = FrameworkColour.Blue;
1414+ }
1515+1616+ protected override Menu CreateSubMenu() => new BasicMenu(Direction.Vertical)
1717+ {
1818+ Anchor = Direction == Direction.Horizontal ? Anchor.BottomLeft : Anchor.TopRight
1919+ };
2020+2121+ protected override DrawableMenuItem CreateDrawableMenuItem(MenuItem item) => new BasicDrawableMenuItem(item);
2222+2323+ public class BasicDrawableMenuItem : DrawableMenuItem
2424+ {
2525+ public BasicDrawableMenuItem(MenuItem item)
2626+ : base(item)
2727+ {
2828+ BackgroundColour = FrameworkColour.BlueGreen;
2929+ BackgroundColourHover = FrameworkColour.Green;
3030+ }
3131+3232+ protected override Drawable CreateContent() => new SpriteText
3333+ {
3434+ Anchor = Anchor.CentreLeft,
3535+ Origin = Anchor.CentreLeft,
3636+ Padding = new MarginPadding(2),
3737+ Font = new FontUsage("RobotoCondensed", weight: "Regular"),
3838+ };
3939+ }
4040+ }
4141+}