From 030b55ae85460f8c1346c5d0574d7886e78bf3c9 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Wed, 3 Jun 2020 17:55:15 +1200 Subject: [PATCH 01/31] Add a section to global keybind settings for song select --- .../Input/Bindings/GlobalActionContainer.cs | 17 +++++++++++++++++ .../KeyBinding/GlobalKeyBindingsSection.cs | 12 ++++++++++++ 2 files changed, 29 insertions(+) diff --git a/osu.Game/Input/Bindings/GlobalActionContainer.cs b/osu.Game/Input/Bindings/GlobalActionContainer.cs index 71771abede..568022b00e 100644 --- a/osu.Game/Input/Bindings/GlobalActionContainer.cs +++ b/osu.Game/Input/Bindings/GlobalActionContainer.cs @@ -56,6 +56,13 @@ namespace osu.Game.Input.Bindings new KeyBinding(new[] { InputKey.Control, InputKey.Minus }, GlobalAction.DecreaseScrollSpeed), }; + public IEnumerable SongSelectKeyBindings => new[] + { + new KeyBinding(InputKey.F1, GlobalAction.ToggleMods), + new KeyBinding(InputKey.F2, GlobalAction.SelectRandom), + new KeyBinding(InputKey.F3, GlobalAction.ToggleOptions) + }; + public IEnumerable AudioControlKeyBindings => new[] { new KeyBinding(new[] { InputKey.Alt, InputKey.Up }, GlobalAction.IncreaseVolume), @@ -106,6 +113,16 @@ namespace osu.Game.Input.Bindings [Description("Toggle mute")] ToggleMute, + // Song select keybindings + [Description("Toggle mod selection overlay")] + ToggleMods, + + [Description("Select a random beatmap")] + SelectRandom, + + [Description("Toggle beatmap options overlay")] + ToggleOptions, + // In-Game Keybindings [Description("Skip cutscene")] SkipCutscene, diff --git a/osu.Game/Overlays/KeyBinding/GlobalKeyBindingsSection.cs b/osu.Game/Overlays/KeyBinding/GlobalKeyBindingsSection.cs index 5b44c486a3..1ae6de4386 100644 --- a/osu.Game/Overlays/KeyBinding/GlobalKeyBindingsSection.cs +++ b/osu.Game/Overlays/KeyBinding/GlobalKeyBindingsSection.cs @@ -21,6 +21,7 @@ namespace osu.Game.Overlays.KeyBinding { Add(new DefaultBindingsSubsection(manager)); Add(new AudioControlKeyBindingsSubsection(manager)); + Add(new SongSelectKeyBindingSubsection(manager)); Add(new InGameKeyBindingsSubsection(manager)); } @@ -35,6 +36,17 @@ namespace osu.Game.Overlays.KeyBinding } } + private class SongSelectKeyBindingSubsection : KeyBindingsSubsection + { + protected override string Header => "Song Select"; + + public SongSelectKeyBindingSubsection(GlobalActionContainer manager) + : base(null) + { + Defaults = manager.SongSelectKeyBindings; + } + } + private class InGameKeyBindingsSubsection : KeyBindingsSubsection { protected override string Header => "In Game"; From 55953b9e858e3828f80abe54a6d4e5eed65f644f Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Wed, 3 Jun 2020 18:13:02 +1200 Subject: [PATCH 02/31] Add a keybinding for selecting the previous random beatmap Also gave the new actions more meaningful names --- osu.Game/Input/Bindings/GlobalActionContainer.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/osu.Game/Input/Bindings/GlobalActionContainer.cs b/osu.Game/Input/Bindings/GlobalActionContainer.cs index 568022b00e..7257b0ce15 100644 --- a/osu.Game/Input/Bindings/GlobalActionContainer.cs +++ b/osu.Game/Input/Bindings/GlobalActionContainer.cs @@ -58,9 +58,10 @@ namespace osu.Game.Input.Bindings public IEnumerable SongSelectKeyBindings => new[] { - new KeyBinding(InputKey.F1, GlobalAction.ToggleMods), - new KeyBinding(InputKey.F2, GlobalAction.SelectRandom), - new KeyBinding(InputKey.F3, GlobalAction.ToggleOptions) + new KeyBinding(InputKey.F1, GlobalAction.ToggleModSelection), + new KeyBinding(InputKey.F2, GlobalAction.SelectNextRandom), + new KeyBinding(new[] { InputKey.Shift, InputKey.F2 }, GlobalAction.SelectPreviousRandom), + new KeyBinding(InputKey.F3, GlobalAction.ToggleBeatmapOptions) }; public IEnumerable AudioControlKeyBindings => new[] @@ -115,13 +116,16 @@ namespace osu.Game.Input.Bindings // Song select keybindings [Description("Toggle mod selection overlay")] - ToggleMods, + ToggleModSelection, [Description("Select a random beatmap")] - SelectRandom, + SelectNextRandom, + + [Description("Select the last random beatmap")] + SelectPreviousRandom, [Description("Toggle beatmap options overlay")] - ToggleOptions, + ToggleBeatmapOptions, // In-Game Keybindings [Description("Skip cutscene")] From 782fddb6f1e722d0814c60d7caf1681e76581e9e Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Thu, 4 Jun 2020 15:21:13 +1200 Subject: [PATCH 03/31] Modify FooterButton to implement IKeyBindingHandler for responding to hotkeys --- osu.Game/Screens/Select/FooterButton.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/osu.Game/Screens/Select/FooterButton.cs b/osu.Game/Screens/Select/FooterButton.cs index 35970cd960..a8393a81d4 100644 --- a/osu.Game/Screens/Select/FooterButton.cs +++ b/osu.Game/Screens/Select/FooterButton.cs @@ -12,10 +12,12 @@ using osu.Framework.Graphics.Sprites; using osu.Framework.Input.Events; using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Containers; +using osu.Game.Input.Bindings; +using osu.Framework.Input.Bindings; namespace osu.Game.Screens.Select { - public class FooterButton : OsuClickableContainer + public class FooterButton : OsuClickableContainer, IKeyBindingHandler { public const float SHEAR_WIDTH = 7.5f; @@ -117,7 +119,7 @@ namespace osu.Game.Screens.Select public Action Hovered; public Action HoverLost; - public Key? Hotkey; + public GlobalAction? Hotkey; protected override void UpdateAfterChildren() { @@ -167,15 +169,19 @@ namespace osu.Game.Screens.Select return base.OnClick(e); } - protected override bool OnKeyDown(KeyDownEvent e) + public virtual bool OnPressed(GlobalAction action) { - if (!e.Repeat && e.Key == Hotkey) + if (action == Hotkey) { Click(); return true; } + return false; + } - return base.OnKeyDown(e); + public virtual void OnReleased(GlobalAction action) + { + } } } From 18db31b50435802cac5b2c0437c293c611999575 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Thu, 4 Jun 2020 15:25:05 +1200 Subject: [PATCH 04/31] Update FooterButtonMods to comply with the changes in FooterButton --- osu.Game/Screens/Select/FooterButtonMods.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/Select/FooterButtonMods.cs b/osu.Game/Screens/Select/FooterButtonMods.cs index 02333da0dc..cde8113fa9 100644 --- a/osu.Game/Screens/Select/FooterButtonMods.cs +++ b/osu.Game/Screens/Select/FooterButtonMods.cs @@ -14,11 +14,12 @@ using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osuTK; using osuTK.Graphics; -using osuTK.Input; +using osu.Framework.Input.Bindings; +using osu.Game.Input.Bindings; namespace osu.Game.Screens.Select { - public class FooterButtonMods : FooterButton, IHasCurrentValue> + public class FooterButtonMods : FooterButton, IHasCurrentValue>, IKeyBindingHandler { public Bindable> Current { @@ -57,7 +58,7 @@ namespace osu.Game.Screens.Select lowMultiplierColour = colours.Red; highMultiplierColour = colours.Green; Text = @"mods"; - Hotkey = Key.F1; + Hotkey = GlobalAction.ToggleModSelection; } protected override void LoadComplete() From 05e4499bc11890090477cbe8d027996399a9c60a Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Thu, 4 Jun 2020 15:25:18 +1200 Subject: [PATCH 05/31] Update FooterButtonOptions to comply with the changes in FooterButton --- osu.Game/Screens/Select/FooterButtonOptions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Select/FooterButtonOptions.cs b/osu.Game/Screens/Select/FooterButtonOptions.cs index c000d8a8c8..e549656785 100644 --- a/osu.Game/Screens/Select/FooterButtonOptions.cs +++ b/osu.Game/Screens/Select/FooterButtonOptions.cs @@ -4,7 +4,7 @@ using osu.Framework.Allocation; using osu.Framework.Extensions.Color4Extensions; using osu.Game.Graphics; -using osuTK.Input; +using osu.Game.Input.Bindings; namespace osu.Game.Screens.Select { @@ -16,7 +16,7 @@ namespace osu.Game.Screens.Select SelectedColour = colours.Blue; DeselectedColour = SelectedColour.Opacity(0.5f); Text = @"options"; - Hotkey = Key.F3; + Hotkey = GlobalAction.ToggleBeatmapOptions; } } } From 568503ef991981f190e17f86d742d80082441560 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Thu, 4 Jun 2020 16:07:50 +1200 Subject: [PATCH 06/31] Update FooterButtonRandom to comply with the changes in FooterButton FooterButtonRandom now has 2 Action variables, one for both primary and secondary --- osu.Game/Screens/Select/FooterButtonRandom.cs | 52 +++++++++++++------ 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/osu.Game/Screens/Select/FooterButtonRandom.cs b/osu.Game/Screens/Select/FooterButtonRandom.cs index a42e6721db..728105200e 100644 --- a/osu.Game/Screens/Select/FooterButtonRandom.cs +++ b/osu.Game/Screens/Select/FooterButtonRandom.cs @@ -1,19 +1,22 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using System; using osu.Framework.Allocation; using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; -using osu.Framework.Input.Events; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; -using osuTK.Input; +using osu.Game.Input.Bindings; namespace osu.Game.Screens.Select { public class FooterButtonRandom : FooterButton { + public Action PrimaryAction { get; set; } + public Action SecondaryAction { get; set; } + private readonly SpriteText secondaryText; private bool secondaryActive; @@ -37,21 +40,7 @@ namespace osu.Game.Screens.Select SelectedColour = colours.Green; DeselectedColour = SelectedColour.Opacity(0.5f); Text = @"random"; - Hotkey = Key.F2; - } - - protected override bool OnKeyDown(KeyDownEvent e) - { - secondaryActive = e.ShiftPressed; - updateText(); - return base.OnKeyDown(e); - } - - protected override void OnKeyUp(KeyUpEvent e) - { - secondaryActive = e.ShiftPressed; - updateText(); - base.OnKeyUp(e); + Hotkey = GlobalAction.SelectNextRandom; } private void updateText() @@ -67,5 +56,34 @@ namespace osu.Game.Screens.Select secondaryText.FadeOut(120, Easing.InQuad); } } + + public override bool OnPressed(GlobalAction action) + { + switch (action) + { + case GlobalAction.SelectPreviousRandom: + secondaryActive = true; + Action = SecondaryAction; + updateText(); + Click(); + return true; + case GlobalAction.SelectNextRandom: + Action = PrimaryAction; + updateText(); + Click(); + return true; + default: + return false; + } + } + + public override void OnReleased(GlobalAction action) + { + if (action == GlobalAction.SelectPreviousRandom) + { + secondaryActive = false; + updateText(); + } + } } } From aa08847bc9fb73b9f1c77dcb711726ef5abfe5e9 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Thu, 4 Jun 2020 16:08:16 +1200 Subject: [PATCH 07/31] 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) From aeb736e9d2a78d7b913a6acfc35c2494fa0e2acd Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Thu, 4 Jun 2020 16:13:50 +1200 Subject: [PATCH 08/31] Fix CodeFactor code style issues --- osu.Game/Screens/Select/FooterButton.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/osu.Game/Screens/Select/FooterButton.cs b/osu.Game/Screens/Select/FooterButton.cs index a8393a81d4..6006d3cbfd 100644 --- a/osu.Game/Screens/Select/FooterButton.cs +++ b/osu.Game/Screens/Select/FooterButton.cs @@ -179,9 +179,6 @@ namespace osu.Game.Screens.Select return false; } - public virtual void OnReleased(GlobalAction action) - { - - } + public virtual void OnReleased(GlobalAction action) { } } } From eb242085c689249663a938e171c5473b33139b18 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Thu, 4 Jun 2020 16:24:32 +1200 Subject: [PATCH 09/31] Remove redundant interface from FooterButtonMods --- osu.Game/Screens/Select/FooterButtonMods.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/osu.Game/Screens/Select/FooterButtonMods.cs b/osu.Game/Screens/Select/FooterButtonMods.cs index cde8113fa9..b98b48a0c0 100644 --- a/osu.Game/Screens/Select/FooterButtonMods.cs +++ b/osu.Game/Screens/Select/FooterButtonMods.cs @@ -14,12 +14,11 @@ using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osuTK; using osuTK.Graphics; -using osu.Framework.Input.Bindings; using osu.Game.Input.Bindings; namespace osu.Game.Screens.Select { - public class FooterButtonMods : FooterButton, IHasCurrentValue>, IKeyBindingHandler + public class FooterButtonMods : FooterButton, IHasCurrentValue> { public Bindable> Current { From 7141bed78d2d5e9004a10a7cf92cd0b1f0cdf049 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Thu, 4 Jun 2020 16:40:16 +1200 Subject: [PATCH 10/31] Remove redundant directive from FooterButton --- osu.Game/Screens/Select/FooterButton.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game/Screens/Select/FooterButton.cs b/osu.Game/Screens/Select/FooterButton.cs index 6006d3cbfd..6ea519fb80 100644 --- a/osu.Game/Screens/Select/FooterButton.cs +++ b/osu.Game/Screens/Select/FooterButton.cs @@ -4,7 +4,6 @@ using System; using osuTK; using osuTK.Graphics; -using osuTK.Input; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; From a78a8c0d0d4bd567aef4b3263edcde776d7fe743 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Thu, 4 Jun 2020 16:59:04 +1200 Subject: [PATCH 11/31] Add missing blank lines --- osu.Game/Screens/Select/FooterButton.cs | 1 + osu.Game/Screens/Select/FooterButtonRandom.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/osu.Game/Screens/Select/FooterButton.cs b/osu.Game/Screens/Select/FooterButton.cs index 6ea519fb80..0502546de8 100644 --- a/osu.Game/Screens/Select/FooterButton.cs +++ b/osu.Game/Screens/Select/FooterButton.cs @@ -175,6 +175,7 @@ namespace osu.Game.Screens.Select Click(); return true; } + return false; } diff --git a/osu.Game/Screens/Select/FooterButtonRandom.cs b/osu.Game/Screens/Select/FooterButtonRandom.cs index 728105200e..fdb1159484 100644 --- a/osu.Game/Screens/Select/FooterButtonRandom.cs +++ b/osu.Game/Screens/Select/FooterButtonRandom.cs @@ -67,11 +67,13 @@ namespace osu.Game.Screens.Select updateText(); Click(); return true; + case GlobalAction.SelectNextRandom: Action = PrimaryAction; updateText(); Click(); return true; + default: return false; } From bd3e40a8cfd6c103d05f399db4186cfc1c6339b7 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Thu, 4 Jun 2020 20:57:24 +1200 Subject: [PATCH 12/31] Move default return out of switch/case --- osu.Game/Screens/Select/FooterButtonRandom.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/Select/FooterButtonRandom.cs b/osu.Game/Screens/Select/FooterButtonRandom.cs index fdb1159484..e2e5c63740 100644 --- a/osu.Game/Screens/Select/FooterButtonRandom.cs +++ b/osu.Game/Screens/Select/FooterButtonRandom.cs @@ -73,10 +73,9 @@ namespace osu.Game.Screens.Select updateText(); Click(); return true; - - default: - return false; } + + return false; } public override void OnReleased(GlobalAction action) From df148cf9d1ffe5fbb9ed6caf3dd4727b215b971e Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Thu, 4 Jun 2020 20:58:19 +1200 Subject: [PATCH 13/31] Rename secondaryAction to rewindSearch --- osu.Game/Screens/Select/FooterButtonRandom.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Game/Screens/Select/FooterButtonRandom.cs b/osu.Game/Screens/Select/FooterButtonRandom.cs index e2e5c63740..e239211c04 100644 --- a/osu.Game/Screens/Select/FooterButtonRandom.cs +++ b/osu.Game/Screens/Select/FooterButtonRandom.cs @@ -18,7 +18,7 @@ namespace osu.Game.Screens.Select public Action SecondaryAction { get; set; } private readonly SpriteText secondaryText; - private bool secondaryActive; + private bool rewindSearch; public FooterButtonRandom() { @@ -45,7 +45,7 @@ namespace osu.Game.Screens.Select private void updateText() { - if (secondaryActive) + if (rewindSearch) { SpriteText.FadeOut(120, Easing.InQuad); secondaryText.FadeIn(120, Easing.InQuad); @@ -62,7 +62,7 @@ namespace osu.Game.Screens.Select switch (action) { case GlobalAction.SelectPreviousRandom: - secondaryActive = true; + rewindSearch = true; Action = SecondaryAction; updateText(); Click(); @@ -82,7 +82,7 @@ namespace osu.Game.Screens.Select { if (action == GlobalAction.SelectPreviousRandom) { - secondaryActive = false; + rewindSearch = false; updateText(); } } From 62984cb7f5da4380939200833cccfe06b4128816 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Thu, 4 Jun 2020 20:58:53 +1200 Subject: [PATCH 14/31] Remove unused Hotkey assignment --- osu.Game/Screens/Select/FooterButtonRandom.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game/Screens/Select/FooterButtonRandom.cs b/osu.Game/Screens/Select/FooterButtonRandom.cs index e239211c04..1c3c699a2d 100644 --- a/osu.Game/Screens/Select/FooterButtonRandom.cs +++ b/osu.Game/Screens/Select/FooterButtonRandom.cs @@ -40,7 +40,6 @@ namespace osu.Game.Screens.Select SelectedColour = colours.Green; DeselectedColour = SelectedColour.Opacity(0.5f); Text = @"random"; - Hotkey = GlobalAction.SelectNextRandom; } private void updateText() From 8533d7573dbc1d468cadc4aa82ecc58ab0631c56 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Thu, 4 Jun 2020 21:00:29 +1200 Subject: [PATCH 15/31] Rename FooterButtonRandom actions to better describe what they are used for --- osu.Game/Screens/Select/FooterButtonRandom.cs | 8 ++++---- osu.Game/Screens/Select/SongSelect.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/osu.Game/Screens/Select/FooterButtonRandom.cs b/osu.Game/Screens/Select/FooterButtonRandom.cs index 1c3c699a2d..9316d4e064 100644 --- a/osu.Game/Screens/Select/FooterButtonRandom.cs +++ b/osu.Game/Screens/Select/FooterButtonRandom.cs @@ -14,8 +14,8 @@ namespace osu.Game.Screens.Select { public class FooterButtonRandom : FooterButton { - public Action PrimaryAction { get; set; } - public Action SecondaryAction { get; set; } + public Action NextRandom { get; set; } + public Action PreviousRandom { get; set; } private readonly SpriteText secondaryText; private bool rewindSearch; @@ -62,13 +62,13 @@ namespace osu.Game.Screens.Select { case GlobalAction.SelectPreviousRandom: rewindSearch = true; - Action = SecondaryAction; + Action = PreviousRandom; updateText(); Click(); return true; case GlobalAction.SelectNextRandom: - Action = PrimaryAction; + Action = NextRandom; updateText(); Click(); return true; diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index e22c055047..70034780d1 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 { PrimaryAction = triggerNextRandom, SecondaryAction = triggerPreviousRandom }); + Footer.AddButton(new FooterButtonRandom { NextRandom = triggerNextRandom, PreviousRandom = triggerPreviousRandom }); Footer.AddButton(new FooterButtonOptions(), BeatmapOptions); BeatmapOptions.AddButton(@"Remove", @"from unplayed", FontAwesome.Regular.TimesCircle, colours.Purple, null, Key.Number1); From cab132673aa226f77039311a005e0ac69379fb08 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Thu, 4 Jun 2020 21:03:10 +1200 Subject: [PATCH 16/31] Break FooterButtonRandom creation into multiple lines --- osu.Game/Screens/Select/SongSelect.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index 70034780d1..fdec0395bd 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -272,7 +272,11 @@ namespace osu.Game.Screens.Select if (Footer != null) { Footer.AddButton(new FooterButtonMods { Current = Mods }, ModSelect); - Footer.AddButton(new FooterButtonRandom { NextRandom = triggerNextRandom, PreviousRandom = triggerPreviousRandom }); + Footer.AddButton(new FooterButtonRandom + { + NextRandom = triggerNextRandom, + PreviousRandom = triggerPreviousRandom + }); Footer.AddButton(new FooterButtonOptions(), BeatmapOptions); BeatmapOptions.AddButton(@"Remove", @"from unplayed", FontAwesome.Regular.TimesCircle, colours.Purple, null, Key.Number1); From cb6e4739107892079b84987a0322c2a5ba963a76 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Thu, 4 Jun 2020 21:08:07 +1200 Subject: [PATCH 17/31] Remove triggerPreviousRandom from SongSelect --- osu.Game/Screens/Select/SongSelect.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index fdec0395bd..453ecd2b4e 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -275,7 +275,7 @@ namespace osu.Game.Screens.Select Footer.AddButton(new FooterButtonRandom { NextRandom = triggerNextRandom, - PreviousRandom = triggerPreviousRandom + PreviousRandom = Carousel.SelectPreviousRandom }); Footer.AddButton(new FooterButtonOptions(), BeatmapOptions); @@ -505,11 +505,6 @@ namespace osu.Game.Screens.Select Carousel.SelectNextRandom(); } - private void triggerPreviousRandom() - { - Carousel.SelectPreviousRandom(); - } - public override void OnEntering(IScreen last) { base.OnEntering(last); From a40475e6aa95b2585e6d811824d5690fec21830a Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Thu, 4 Jun 2020 21:09:47 +1200 Subject: [PATCH 18/31] Remove triggerNextRandom from SongSelect --- osu.Game/Screens/Select/SongSelect.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index 453ecd2b4e..6ca53bcfa9 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -274,7 +274,7 @@ namespace osu.Game.Screens.Select Footer.AddButton(new FooterButtonMods { Current = Mods }, ModSelect); Footer.AddButton(new FooterButtonRandom { - NextRandom = triggerNextRandom, + NextRandom = () => Carousel.SelectNextRandom(), PreviousRandom = Carousel.SelectPreviousRandom }); Footer.AddButton(new FooterButtonOptions(), BeatmapOptions); @@ -500,11 +500,6 @@ namespace osu.Game.Screens.Select } } - private void triggerNextRandom() - { - Carousel.SelectNextRandom(); - } - public override void OnEntering(IScreen last) { base.OnEntering(last); From 0e155c8eb9729106891708bee5eadc63acdf0ef6 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Sun, 7 Jun 2020 15:34:19 +1200 Subject: [PATCH 19/31] Don't switch FooterButtonRandon Action on pressed. Instead, create a new Action that invokes either NextRandom or PreviousRandom, depending on rewindSearch --- osu.Game/Screens/Select/FooterButtonRandom.cs | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/osu.Game/Screens/Select/FooterButtonRandom.cs b/osu.Game/Screens/Select/FooterButtonRandom.cs index 9316d4e064..07de29a0ea 100644 --- a/osu.Game/Screens/Select/FooterButtonRandom.cs +++ b/osu.Game/Screens/Select/FooterButtonRandom.cs @@ -40,6 +40,17 @@ namespace osu.Game.Screens.Select SelectedColour = colours.Green; DeselectedColour = SelectedColour.Opacity(0.5f); Text = @"random"; + Action = () => + { + if (rewindSearch) + { + PreviousRandom.Invoke(); + } + else + { + NextRandom.Invoke(); + } + }; } private void updateText() @@ -58,23 +69,14 @@ namespace osu.Game.Screens.Select public override bool OnPressed(GlobalAction action) { - switch (action) + rewindSearch = action == GlobalAction.SelectPreviousRandom; + if (action != GlobalAction.SelectNextRandom && !rewindSearch) { - case GlobalAction.SelectPreviousRandom: - rewindSearch = true; - Action = PreviousRandom; - updateText(); - Click(); - return true; - - case GlobalAction.SelectNextRandom: - Action = NextRandom; - updateText(); - Click(); - return true; + return false; } - - return false; + updateText(); + Click(); + return true; } public override void OnReleased(GlobalAction action) From 7c04e9aca4a6a302ffd601fd4e406b645387daaa Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Sun, 7 Jun 2020 15:37:19 +1200 Subject: [PATCH 20/31] Move new GlobalAction keybinding entries to the end of the class. The new keybindings shouldn't mess with existing bindings anymore --- .../Input/Bindings/GlobalActionContainer.cs | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/osu.Game/Input/Bindings/GlobalActionContainer.cs b/osu.Game/Input/Bindings/GlobalActionContainer.cs index 7257b0ce15..bdfad68a13 100644 --- a/osu.Game/Input/Bindings/GlobalActionContainer.cs +++ b/osu.Game/Input/Bindings/GlobalActionContainer.cs @@ -114,19 +114,6 @@ namespace osu.Game.Input.Bindings [Description("Toggle mute")] ToggleMute, - // Song select keybindings - [Description("Toggle mod selection overlay")] - ToggleModSelection, - - [Description("Select a random beatmap")] - SelectNextRandom, - - [Description("Select the last random beatmap")] - SelectPreviousRandom, - - [Description("Toggle beatmap options overlay")] - ToggleBeatmapOptions, - // In-Game Keybindings [Description("Skip cutscene")] SkipCutscene, @@ -173,5 +160,18 @@ namespace osu.Game.Input.Bindings [Description("Next Selection")] SelectNext, + + // Song select keybindings + [Description("Toggle mod selection overlay")] + ToggleModSelection, + + [Description("Select a random beatmap")] + SelectNextRandom, + + [Description("Select the last random beatmap")] + SelectPreviousRandom, + + [Description("Toggle beatmap options overlay")] + ToggleBeatmapOptions, } } From 8b7718116ded732bd062ee103dd875b8af9a6ed5 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Sun, 7 Jun 2020 16:06:18 +1200 Subject: [PATCH 21/31] Add missing blank lines --- osu.Game/Screens/Select/FooterButtonRandom.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osu.Game/Screens/Select/FooterButtonRandom.cs b/osu.Game/Screens/Select/FooterButtonRandom.cs index 07de29a0ea..2c4dd58763 100644 --- a/osu.Game/Screens/Select/FooterButtonRandom.cs +++ b/osu.Game/Screens/Select/FooterButtonRandom.cs @@ -70,10 +70,12 @@ namespace osu.Game.Screens.Select public override bool OnPressed(GlobalAction action) { rewindSearch = action == GlobalAction.SelectPreviousRandom; + if (action != GlobalAction.SelectNextRandom && !rewindSearch) { return false; } + updateText(); Click(); return true; From bddd2b72ba257370e999a9f958f090cb83ef57c9 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Mon, 8 Jun 2020 15:05:53 +1200 Subject: [PATCH 22/31] Remove secondaryText and related code from FooterButtonRandom --- osu.Game/Screens/Select/FooterButtonRandom.cs | 31 +------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/osu.Game/Screens/Select/FooterButtonRandom.cs b/osu.Game/Screens/Select/FooterButtonRandom.cs index 2c4dd58763..7574d01a7b 100644 --- a/osu.Game/Screens/Select/FooterButtonRandom.cs +++ b/osu.Game/Screens/Select/FooterButtonRandom.cs @@ -17,22 +17,9 @@ namespace osu.Game.Screens.Select public Action NextRandom { get; set; } public Action PreviousRandom { get; set; } - private readonly SpriteText secondaryText; private bool rewindSearch; - public FooterButtonRandom() - { - TextContainer.Add(secondaryText = new OsuSpriteText - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - Text = @"rewind", - Alpha = 0, - }); - - // force both text sprites to always be present to avoid width flickering while they're being swapped out - SpriteText.AlwaysPresent = secondaryText.AlwaysPresent = true; - } + public FooterButtonRandom() { } [BackgroundDependencyLoader] private void load(OsuColour colours) @@ -53,20 +40,6 @@ namespace osu.Game.Screens.Select }; } - private void updateText() - { - if (rewindSearch) - { - SpriteText.FadeOut(120, Easing.InQuad); - secondaryText.FadeIn(120, Easing.InQuad); - } - else - { - SpriteText.FadeIn(120, Easing.InQuad); - secondaryText.FadeOut(120, Easing.InQuad); - } - } - public override bool OnPressed(GlobalAction action) { rewindSearch = action == GlobalAction.SelectPreviousRandom; @@ -76,7 +49,6 @@ namespace osu.Game.Screens.Select return false; } - updateText(); Click(); return true; } @@ -86,7 +58,6 @@ namespace osu.Game.Screens.Select if (action == GlobalAction.SelectPreviousRandom) { rewindSearch = false; - updateText(); } } } From ea9207e0ad21434d79eace9e527a3719ad1232c0 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Mon, 8 Jun 2020 17:31:31 +1200 Subject: [PATCH 23/31] Clean up FooterButtonRandom Removed unnecessary using statements Removed unnecessary constructor --- osu.Game/Screens/Select/FooterButtonRandom.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/osu.Game/Screens/Select/FooterButtonRandom.cs b/osu.Game/Screens/Select/FooterButtonRandom.cs index 7574d01a7b..363c2e4c10 100644 --- a/osu.Game/Screens/Select/FooterButtonRandom.cs +++ b/osu.Game/Screens/Select/FooterButtonRandom.cs @@ -4,10 +4,7 @@ using System; using osu.Framework.Allocation; using osu.Framework.Extensions.Color4Extensions; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Sprites; using osu.Game.Graphics; -using osu.Game.Graphics.Sprites; using osu.Game.Input.Bindings; namespace osu.Game.Screens.Select @@ -19,8 +16,6 @@ namespace osu.Game.Screens.Select private bool rewindSearch; - public FooterButtonRandom() { } - [BackgroundDependencyLoader] private void load(OsuColour colours) { From 9dc1eab6ae702550a6c3c8a9c5734183816a870f Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Wed, 10 Jun 2020 13:05:11 +1200 Subject: [PATCH 24/31] Improve code readability of FooterButtonRandom OnPressed --- osu.Game/Screens/Select/FooterButtonRandom.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Screens/Select/FooterButtonRandom.cs b/osu.Game/Screens/Select/FooterButtonRandom.cs index 363c2e4c10..b314971cb3 100644 --- a/osu.Game/Screens/Select/FooterButtonRandom.cs +++ b/osu.Game/Screens/Select/FooterButtonRandom.cs @@ -39,7 +39,7 @@ namespace osu.Game.Screens.Select { rewindSearch = action == GlobalAction.SelectPreviousRandom; - if (action != GlobalAction.SelectNextRandom && !rewindSearch) + if (action != GlobalAction.SelectNextRandom && action != GlobalAction.SelectPreviousRandom) { return false; } From 080bf1e85a034e4a3fa58a91b66683fd482ca8b3 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 15 Jun 2020 13:46:16 +0900 Subject: [PATCH 25/31] Fix missing default inclusion --- osu.Game/Input/Bindings/GlobalActionContainer.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/osu.Game/Input/Bindings/GlobalActionContainer.cs b/osu.Game/Input/Bindings/GlobalActionContainer.cs index bdfad68a13..4429bf27cf 100644 --- a/osu.Game/Input/Bindings/GlobalActionContainer.cs +++ b/osu.Game/Input/Bindings/GlobalActionContainer.cs @@ -21,7 +21,10 @@ namespace osu.Game.Input.Bindings handler = game; } - public override IEnumerable DefaultKeyBindings => GlobalKeyBindings.Concat(InGameKeyBindings).Concat(AudioControlKeyBindings); + public override IEnumerable DefaultKeyBindings => GlobalKeyBindings + .Concat(InGameKeyBindings) + .Concat(AudioControlKeyBindings) + .Concat(SongSelectKeyBindings); public IEnumerable GlobalKeyBindings => new[] { From e15324ca900cde9e37d3d52b79f27be690bd66eb Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Mon, 15 Jun 2020 21:44:38 +1200 Subject: [PATCH 26/31] Shorten new binding descriptions --- osu.Game/Input/Bindings/GlobalActionContainer.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Game/Input/Bindings/GlobalActionContainer.cs b/osu.Game/Input/Bindings/GlobalActionContainer.cs index 4429bf27cf..851a848b8f 100644 --- a/osu.Game/Input/Bindings/GlobalActionContainer.cs +++ b/osu.Game/Input/Bindings/GlobalActionContainer.cs @@ -165,16 +165,16 @@ namespace osu.Game.Input.Bindings SelectNext, // Song select keybindings - [Description("Toggle mod selection overlay")] + [Description("Toggle Mod Select")] ToggleModSelection, - [Description("Select a random beatmap")] + [Description("Random")] SelectNextRandom, - [Description("Select the last random beatmap")] + [Description("Rewind")] SelectPreviousRandom, - [Description("Toggle beatmap options overlay")] + [Description("Beatmap Options")] ToggleBeatmapOptions, } } From 08858e6426c520bb038ca774da64902dc21e70e9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 7 Apr 2021 17:41:05 +0900 Subject: [PATCH 27/31] Reorder defaults to give non-global areas priority for global actions --- .../Input/Bindings/DatabasedKeyBindingContainer.cs | 12 ++++++++++-- osu.Game/Input/Bindings/GlobalActionContainer.cs | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/osu.Game/Input/Bindings/DatabasedKeyBindingContainer.cs b/osu.Game/Input/Bindings/DatabasedKeyBindingContainer.cs index d12eaa10f6..cd8b486f23 100644 --- a/osu.Game/Input/Bindings/DatabasedKeyBindingContainer.cs +++ b/osu.Game/Input/Bindings/DatabasedKeyBindingContainer.cs @@ -64,12 +64,20 @@ namespace osu.Game.Input.Bindings protected override void ReloadMappings() { + var defaults = DefaultKeyBindings.ToList(); + if (ruleset != null && !ruleset.ID.HasValue) // if the provided ruleset is not stored to the database, we have no way to retrieve custom bindings. // fallback to defaults instead. - KeyBindings = DefaultKeyBindings; + KeyBindings = defaults; else - KeyBindings = store.Query(ruleset?.ID, variant).ToList(); + { + KeyBindings = store.Query(ruleset?.ID, variant) + // this ordering is important to ensure that we read entries from the database in the order + // enforced by DefaultKeyBindings. allow for song select to handle actions that may otherwise + // have been eaten by the music controller due to query order. + .OrderBy(b => defaults.FindIndex(d => (int)d.Action == b.IntAction)).ToList(); + } } } } diff --git a/osu.Game/Input/Bindings/GlobalActionContainer.cs b/osu.Game/Input/Bindings/GlobalActionContainer.cs index c2f707a4e8..042960d54c 100644 --- a/osu.Game/Input/Bindings/GlobalActionContainer.cs +++ b/osu.Game/Input/Bindings/GlobalActionContainer.cs @@ -28,10 +28,10 @@ namespace osu.Game.Input.Bindings } public override IEnumerable DefaultKeyBindings => GlobalKeyBindings + .Concat(EditorKeyBindings) .Concat(InGameKeyBindings) - .Concat(AudioControlKeyBindings) .Concat(SongSelectKeyBindings) - .Concat(EditorKeyBindings); + .Concat(AudioControlKeyBindings); public IEnumerable GlobalKeyBindings => new[] { From b4c6894d13d96a9ba65162492459a2fe0a46de3e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 7 Apr 2021 18:29:31 +0900 Subject: [PATCH 28/31] Add test coverage for song select footer area --- .../SongSelect/TestSceneSongSelectFooter.cs | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 osu.Game.Tests/Visual/SongSelect/TestSceneSongSelectFooter.cs diff --git a/osu.Game.Tests/Visual/SongSelect/TestSceneSongSelectFooter.cs b/osu.Game.Tests/Visual/SongSelect/TestSceneSongSelectFooter.cs new file mode 100644 index 0000000000..0ac65b357c --- /dev/null +++ b/osu.Game.Tests/Visual/SongSelect/TestSceneSongSelectFooter.cs @@ -0,0 +1,35 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using osu.Framework.Graphics; +using osu.Game.Screens.Select; + +namespace osu.Game.Tests.Visual.SongSelect +{ + public class TestSceneSongSelectFooter : OsuManualInputManagerTestScene + { + public TestSceneSongSelectFooter() + { + AddStep("Create footer", () => + { + Footer footer; + AddRange(new Drawable[] + { + footer = new Footer + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + } + }); + + footer.AddButton(new FooterButtonMods(), null); + footer.AddButton(new FooterButtonRandom + { + NextRandom = () => { }, + PreviousRandom = () => { }, + }, null); + footer.AddButton(new FooterButtonOptions(), null); + }); + } + } +} From 0f2c03d54bb19c36ccc85bead76f4ce574ac7af9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 7 Apr 2021 18:29:45 +0900 Subject: [PATCH 29/31] Add back "rewind" text, showing temporarily after a rewind occurs --- osu.Game/Screens/Select/FooterButton.cs | 1 + osu.Game/Screens/Select/FooterButtonRandom.cs | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/osu.Game/Screens/Select/FooterButton.cs b/osu.Game/Screens/Select/FooterButton.cs index dfcdd1b45f..7528651fd9 100644 --- a/osu.Game/Screens/Select/FooterButton.cs +++ b/osu.Game/Screens/Select/FooterButton.cs @@ -106,6 +106,7 @@ namespace osu.Game.Screens.Select AutoSizeAxes = Axes.Both, Child = SpriteText = new OsuSpriteText { + AlwaysPresent = true, Anchor = Anchor.Centre, Origin = Anchor.Centre, } diff --git a/osu.Game/Screens/Select/FooterButtonRandom.cs b/osu.Game/Screens/Select/FooterButtonRandom.cs index b314971cb3..2d14111137 100644 --- a/osu.Game/Screens/Select/FooterButtonRandom.cs +++ b/osu.Game/Screens/Select/FooterButtonRandom.cs @@ -4,8 +4,11 @@ using System; using osu.Framework.Allocation; using osu.Framework.Extensions.Color4Extensions; +using osu.Framework.Graphics; using osu.Game.Graphics; +using osu.Game.Graphics.Sprites; using osu.Game.Input.Bindings; +using osuTK; namespace osu.Game.Screens.Select { @@ -22,10 +25,30 @@ namespace osu.Game.Screens.Select SelectedColour = colours.Green; DeselectedColour = SelectedColour.Opacity(0.5f); Text = @"random"; + Action = () => { if (rewindSearch) { + const double fade_time = 500; + + OsuSpriteText rewindSpriteText; + + TextContainer.Add(rewindSpriteText = new OsuSpriteText + { + Alpha = 0, + Text = @"rewind", + AlwaysPresent = true, // make sure the button is sized large enough to always show this + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + }); + + rewindSpriteText.FadeOutFromOne(fade_time, Easing.In); + rewindSpriteText.MoveTo(Vector2.Zero).MoveTo(new Vector2(0, 10), fade_time, Easing.In); + rewindSpriteText.Expire(); + + SpriteText.FadeInFromZero(fade_time, Easing.In); + PreviousRandom.Invoke(); } else From aa424165b3790cdccd6d094b7310d68de6a16e6a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 7 Apr 2021 18:45:57 +0900 Subject: [PATCH 30/31] Fix broken taiko test --- osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneInputDrum.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneInputDrum.cs b/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneInputDrum.cs index fa6c9da174..9b36b064bc 100644 --- a/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneInputDrum.cs +++ b/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneInputDrum.cs @@ -17,7 +17,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning [BackgroundDependencyLoader] private void load() { - SetContents(() => new TaikoInputManager(new RulesetInfo { ID = 1 }) + SetContents(() => new TaikoInputManager(new TaikoRuleset().RulesetInfo) { RelativeSizeAxes = Axes.Both, Child = new Container From 7d37c4df8cc6d1e043b06cb1b887bc443b7ad5c2 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 7 Apr 2021 20:17:20 +0900 Subject: [PATCH 31/31] Fix broken osu tests --- osu.Game.Rulesets.Osu.Tests/OsuSkinnableTestScene.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu.Tests/OsuSkinnableTestScene.cs b/osu.Game.Rulesets.Osu.Tests/OsuSkinnableTestScene.cs index cad98185ce..233aaf2ed9 100644 --- a/osu.Game.Rulesets.Osu.Tests/OsuSkinnableTestScene.cs +++ b/osu.Game.Rulesets.Osu.Tests/OsuSkinnableTestScene.cs @@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Osu.Tests get { if (content == null) - base.Content.Add(content = new OsuInputManager(new RulesetInfo { ID = 0 })); + base.Content.Add(content = new OsuInputManager(new OsuRuleset().RulesetInfo)); return content; }