Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion osu.Game/Screens/SelectV2/PanelBeatmapSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
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;
Expand Down Expand Up @@ -217,7 +218,19 @@ public override MenuItem[] ContextMenuItems

List<MenuItem> items = new List<MenuItem>();

if (!Expanded.Value)
if (Expanded.Value)
{
if (songSelect is SoloSongSelect soloSongSelect)
Copy link
Collaborator

@bdach bdach Jul 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea of this diff makes sense and I can't seem to break it on a quick check but I have very mixed feelings about this type of cast. We have ISongSelect which nicely abstracts this type of thing for all of the other panels and now here's this sort of stuff.

Thoughts on having a ISongSelect.GetForwardActions(BeatmapSetInfo) overload?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could do that. The only caveat is it couldn't be used in the other location I abstracted the beatmap version for (the footer menu) because that would mean the edit option would appear twice.

{
// 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());
Expand Down