1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-22 10:30:00 +08:00

Merge pull request #34380 from peppy/edit-from-set-panel

Add back "edit" context menu item on set panel headers
This commit is contained in:
Bartłomiej Dach
2025-07-28 09:11:55 +02:00
committed by GitHub
Unverified
+14 -1
View File
@@ -7,6 +7,7 @@ using System.Diagnostics;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Extensions.LocalisationExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
@@ -217,7 +218,19 @@ namespace osu.Game.Screens.SelectV2
List<MenuItem> items = new List<MenuItem>();
if (!Expanded.Value)
if (Expanded.Value)
{
if (songSelect is SoloSongSelect soloSongSelect)
{
// Assume the current set has one of its beatmaps selected since it is expanded.
items.Add(new OsuMenuItem(ButtonSystemStrings.Edit.ToSentence(), MenuItemType.Standard, () => soloSongSelect.Edit(soloSongSelect.Beatmap.Value.BeatmapInfo))
{
Icon = FontAwesome.Solid.PencilAlt
});
items.Add(new OsuMenuItemSpacer());
}
}
else
{
items.Add(new OsuMenuItem("Expand", MenuItemType.Highlighted, () => TriggerClick()));
items.Add(new OsuMenuItemSpacer());