diff --git a/osu.Game/Screens/Edit/Components/Menus/EditorMenuBar.cs b/osu.Game/Screens/Edit/Components/Menus/EditorMenuBar.cs index 0e125d0ec0..152bcee214 100644 --- a/osu.Game/Screens/Edit/Components/Menus/EditorMenuBar.cs +++ b/osu.Game/Screens/Edit/Components/Menus/EditorMenuBar.cs @@ -1,6 +1,7 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using System.Linq; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; @@ -184,6 +185,17 @@ namespace osu.Game.Screens.Edit.Components.Menus { } + private bool hasSubmenu => Item.Items.Any(); + + protected override TextContainer CreateTextContainer() => base.CreateTextContainer().With(c => + { + c.Padding = new MarginPadding + { + // Add some padding for the chevron below. + Right = hasSubmenu ? 5 : 0, + }; + }); + [BackgroundDependencyLoader] private void load(OverlayColourProvider colourProvider) { @@ -191,6 +203,18 @@ namespace osu.Game.Screens.Edit.Components.Menus BackgroundColourHover = colourProvider.Background1; Foreground.Padding = new MarginPadding { Vertical = 2 }; + + if (hasSubmenu) + { + AddInternal(new SpriteIcon + { + Margin = new MarginPadding(6), + Size = new Vector2(8), + Icon = FontAwesome.Solid.ChevronRight, + Anchor = Anchor.CentreRight, + Origin = Anchor.CentreRight, + }); + } } } }