mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 18:42:56 +08:00
Allow footer buttons to be customised
This commit is contained in:
parent
91d34d86f7
commit
4019cc38e5
@ -263,9 +263,8 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
if (Footer != null)
|
||||
{
|
||||
Footer.AddButton(new FooterButtonMods { Current = Mods }, ModSelect);
|
||||
Footer.AddButton(new FooterButtonRandom { Action = triggerRandom });
|
||||
Footer.AddButton(new FooterButtonOptions(), BeatmapOptions);
|
||||
foreach (var (button, overlay) in CreateFooterButtons())
|
||||
Footer.AddButton(button, overlay);
|
||||
|
||||
BeatmapOptions.AddButton(@"Manage", @"collections", FontAwesome.Solid.Book, colours.Green, () => manageCollectionsDialog?.Show());
|
||||
BeatmapOptions.AddButton(@"Delete", @"all difficulties", FontAwesome.Solid.Trash, colours.Pink, () => delete(Beatmap.Value.BeatmapSetInfo));
|
||||
@ -301,6 +300,13 @@ namespace osu.Game.Screens.Select
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual IEnumerable<(FooterButton, OverlayContainer)> CreateFooterButtons() => new (FooterButton, OverlayContainer)[]
|
||||
{
|
||||
(new FooterButtonMods { Current = Mods }, ModSelect),
|
||||
(new FooterButtonRandom { Action = triggerRandom }, null),
|
||||
(new FooterButtonOptions(), BeatmapOptions)
|
||||
};
|
||||
|
||||
protected virtual ModSelectOverlay CreateModSelectOverlay() => new SoloModSelectOverlay();
|
||||
|
||||
protected virtual void ApplyFilterToCarousel(FilterCriteria criteria)
|
||||
|
Loading…
Reference in New Issue
Block a user