From 69e2d4fd22b61c150adda0c76d0330362f64e800 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 2 Apr 2018 15:23:58 +0900 Subject: [PATCH] Make CarouselRoot a nested class --- osu.Game/Screens/Select/BeatmapCarousel.cs | 18 +++++++++++++++ .../Screens/Select/Carousel/CarouselRoot.cs | 23 ------------------- 2 files changed, 18 insertions(+), 23 deletions(-) delete mode 100644 osu.Game/Screens/Select/Carousel/CarouselRoot.cs diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs index dfbbc2b5d5..96f2e40553 100644 --- a/osu.Game/Screens/Select/BeatmapCarousel.cs +++ b/osu.Game/Screens/Select/BeatmapCarousel.cs @@ -628,5 +628,23 @@ namespace osu.Game.Screens.Select // layer transformations on top, with a similar reasoning to the previous comment. p.SetMultiplicativeAlpha(MathHelper.Clamp(1.75f - 1.5f * dist, 0, 1)); } + + private class CarouselRoot : CarouselGroupEagerSelect + { + private readonly BeatmapCarousel carousel; + + public CarouselRoot(BeatmapCarousel carousel) + { + this.carousel = carousel; + } + + protected override void PerformSelection() + { + if (LastSelected == null) + carousel.SelectNextRandom(); + else + base.PerformSelection(); + } + } } } diff --git a/osu.Game/Screens/Select/Carousel/CarouselRoot.cs b/osu.Game/Screens/Select/Carousel/CarouselRoot.cs deleted file mode 100644 index b23d7631c9..0000000000 --- a/osu.Game/Screens/Select/Carousel/CarouselRoot.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2007-2018 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -namespace osu.Game.Screens.Select.Carousel -{ - public class CarouselRoot : CarouselGroupEagerSelect - { - private readonly BeatmapCarousel carousel; - - public CarouselRoot(BeatmapCarousel carousel) - { - this.carousel = carousel; - } - - protected override void PerformSelection() - { - if (LastSelected == null) - carousel.SelectNextRandom(); - else - base.PerformSelection(); - } - } -}