mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 07:42:57 +08:00
Rename and document method to limit scope
This commit is contained in:
parent
91fbf388da
commit
f7094567d7
@ -85,7 +85,7 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
|
||||
if (songSelect != null)
|
||||
{
|
||||
mainMenuItems = songSelect.CreateMenuItemsForBeatmap(beatmapInfo);
|
||||
mainMenuItems = songSelect.CreateForwardNavigationMenuItemsForBeatmap(beatmapInfo);
|
||||
selectRequested = b => songSelect.FinaliseSelection(b);
|
||||
}
|
||||
|
||||
|
@ -34,10 +34,10 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
public override bool AllowExternalScreenChange => true;
|
||||
|
||||
public override MenuItem[] CreateMenuItemsForBeatmap(BeatmapInfo b) => new MenuItem[]
|
||||
public override MenuItem[] CreateForwardNavigationMenuItemsForBeatmap(BeatmapInfo beatmap) => new MenuItem[]
|
||||
{
|
||||
new OsuMenuItem(ButtonSystemStrings.Play.ToSentence(), MenuItemType.Highlighted, () => FinaliseSelection(b)),
|
||||
new OsuMenuItem(ButtonSystemStrings.Edit.ToSentence(), MenuItemType.Standard, () => Edit(b))
|
||||
new OsuMenuItem(ButtonSystemStrings.Play.ToSentence(), MenuItemType.Highlighted, () => FinaliseSelection(beatmap)),
|
||||
new OsuMenuItem(ButtonSystemStrings.Edit.ToSentence(), MenuItemType.Standard, () => Edit(beatmap))
|
||||
};
|
||||
|
||||
protected override UserActivity InitialActivity => new UserActivity.ChoosingBeatmap();
|
||||
|
@ -84,9 +84,15 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
public bool BeatmapSetsLoaded => IsLoaded && Carousel.BeatmapSetsLoaded;
|
||||
|
||||
public virtual MenuItem[] CreateMenuItemsForBeatmap(BeatmapInfo b) => new MenuItem[]
|
||||
/// <summary>
|
||||
/// Creates any "action" menu items for the provided beatmap (ie. "Select", "Play", "Edit").
|
||||
/// These will always be placed at the top of the context menu, with common items added below them.
|
||||
/// </summary>
|
||||
/// <param name="beatmap">The beatmap to create items for.</param>
|
||||
/// <returns>The menu items.</returns>
|
||||
public virtual MenuItem[] CreateForwardNavigationMenuItemsForBeatmap(BeatmapInfo beatmap) => new MenuItem[]
|
||||
{
|
||||
new OsuMenuItem(@"Select", MenuItemType.Highlighted, () => FinaliseSelection(b))
|
||||
new OsuMenuItem(@"Select", MenuItemType.Highlighted, () => FinaliseSelection(beatmap))
|
||||
};
|
||||
|
||||
[Resolved]
|
||||
|
Loading…
Reference in New Issue
Block a user