From aa08847bc9fb73b9f1c77dcb711726ef5abfe5e9 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Thu, 4 Jun 2020 16:08:16 +1200 Subject: [PATCH] Set FooterButtonRandom actions properly when creating the button --- osu.Game/Screens/Select/SongSelect.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index d613b0ae8d..e22c055047 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -272,7 +272,7 @@ namespace osu.Game.Screens.Select if (Footer != null) { Footer.AddButton(new FooterButtonMods { Current = Mods }, ModSelect); - Footer.AddButton(new FooterButtonRandom { Action = triggerRandom }); + Footer.AddButton(new FooterButtonRandom { PrimaryAction = triggerNextRandom, SecondaryAction = triggerPreviousRandom }); Footer.AddButton(new FooterButtonOptions(), BeatmapOptions); BeatmapOptions.AddButton(@"Remove", @"from unplayed", FontAwesome.Regular.TimesCircle, colours.Purple, null, Key.Number1); @@ -496,12 +496,14 @@ namespace osu.Game.Screens.Select } } - private void triggerRandom() + private void triggerNextRandom() { - if (GetContainingInputManager().CurrentState.Keyboard.ShiftPressed) - Carousel.SelectPreviousRandom(); - else - Carousel.SelectNextRandom(); + Carousel.SelectNextRandom(); + } + + private void triggerPreviousRandom() + { + Carousel.SelectPreviousRandom(); } public override void OnEntering(IScreen last)