diff --git a/osu.Game.Tests/Visual/SongSelect/TestSceneSongSelectFooterV2.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneScreenFooter.cs similarity index 89% rename from osu.Game.Tests/Visual/SongSelect/TestSceneSongSelectFooterV2.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneScreenFooter.cs index 93402e42ce..162609df70 100644 --- a/osu.Game.Tests/Visual/SongSelect/TestSceneSongSelectFooterV2.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneScreenFooter.cs @@ -15,15 +15,16 @@ using osu.Game.Overlays.Mods; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Osu; using osu.Game.Rulesets.Osu.Mods; -using osu.Game.Screens.Select.FooterV2; +using osu.Game.Screens.Footer; +using osu.Game.Screens.SelectV2.Footer; using osuTK.Input; -namespace osu.Game.Tests.Visual.SongSelect +namespace osu.Game.Tests.Visual.UserInterface { - public partial class TestSceneSongSelectFooterV2 : OsuManualInputManagerTestScene + public partial class TestSceneScreenFooter : OsuManualInputManagerTestScene { - private FooterButtonRandomV2 randomButton = null!; - private FooterButtonModsV2 modsButton = null!; + private ScreenFooterButtonRandom randomButton = null!; + private ScreenFooterButtonMods modsButton = null!; private bool nextRandomCalled; private bool previousRandomCalled; @@ -39,25 +40,25 @@ namespace osu.Game.Tests.Visual.SongSelect nextRandomCalled = false; previousRandomCalled = false; - FooterV2 footer; + ScreenFooter footer; Children = new Drawable[] { new PopoverContainer { RelativeSizeAxes = Axes.Both, - Child = footer = new FooterV2(), + Child = footer = new ScreenFooter(), }, overlay = new DummyOverlay() }; - footer.AddButton(modsButton = new FooterButtonModsV2 { Current = SelectedMods }, overlay); - footer.AddButton(randomButton = new FooterButtonRandomV2 + footer.AddButton(modsButton = new ScreenFooterButtonMods { Current = SelectedMods }, overlay); + footer.AddButton(randomButton = new ScreenFooterButtonRandom { NextRandom = () => nextRandomCalled = true, PreviousRandom = () => previousRandomCalled = true }); - footer.AddButton(new FooterButtonOptionsV2()); + footer.AddButton(new ScreenFooterButtonOptions()); overlay.Hide(); }); @@ -98,7 +99,7 @@ namespace osu.Game.Tests.Visual.SongSelect { AddStep("enable options", () => { - var optionsButton = this.ChildrenOfType().Last(); + var optionsButton = this.ChildrenOfType().Last(); optionsButton.Enabled.Value = true; optionsButton.TriggerClick(); @@ -108,7 +109,7 @@ namespace osu.Game.Tests.Visual.SongSelect [Test] public void TestState() { - AddToggleStep("set options enabled state", state => this.ChildrenOfType().Last().Enabled.Value = state); + AddToggleStep("set options enabled state", state => this.ChildrenOfType().Last().Enabled.Value = state); } [Test] diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneFooterButtonModsV2.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneScreenFooterButtonMods.cs similarity index 90% rename from osu.Game.Tests/Visual/UserInterface/TestSceneFooterButtonModsV2.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneScreenFooterButtonMods.cs index 4aca9dde3d..df2109ace8 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestSceneFooterButtonModsV2.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneScreenFooterButtonMods.cs @@ -12,21 +12,21 @@ using osu.Game.Graphics.Sprites; using osu.Game.Overlays; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Osu.Mods; -using osu.Game.Screens.Select.FooterV2; +using osu.Game.Screens.SelectV2.Footer; using osu.Game.Utils; namespace osu.Game.Tests.Visual.UserInterface { - public partial class TestSceneFooterButtonModsV2 : OsuTestScene + public partial class TestSceneScreenFooterButtonMods : OsuTestScene { - private readonly TestFooterButtonModsV2 footerButtonMods; + private readonly TestScreenFooterButtonMods footerButtonMods; [Cached] private OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Aquamarine); - public TestSceneFooterButtonModsV2() + public TestSceneScreenFooterButtonMods() { - Add(footerButtonMods = new TestFooterButtonModsV2 + Add(footerButtonMods = new TestScreenFooterButtonMods { Anchor = Anchor.Centre, Origin = Anchor.CentreLeft, @@ -97,9 +97,9 @@ namespace osu.Game.Tests.Visual.UserInterface public void TestUnrankedBadge() { AddStep(@"Add unranked mod", () => changeMods(new[] { new OsuModDeflate() })); - AddUntilStep("Unranked badge shown", () => footerButtonMods.ChildrenOfType().Single().Alpha == 1); + AddUntilStep("Unranked badge shown", () => footerButtonMods.ChildrenOfType().Single().Alpha == 1); AddStep(@"Clear selected mod", () => changeMods(Array.Empty())); - AddUntilStep("Unranked badge not shown", () => footerButtonMods.ChildrenOfType().Single().Alpha == 0); + AddUntilStep("Unranked badge not shown", () => footerButtonMods.ChildrenOfType().Single().Alpha == 0); } private void changeMods(IReadOnlyList mods) => footerButtonMods.Current.Value = mods; @@ -112,7 +112,7 @@ namespace osu.Game.Tests.Visual.UserInterface return expectedValue == footerButtonMods.MultiplierText.Current.Value; } - private partial class TestFooterButtonModsV2 : FooterButtonModsV2 + private partial class TestScreenFooterButtonMods : ScreenFooterButtonMods { public new OsuSpriteText MultiplierText => base.MultiplierText; } diff --git a/osu.Game/Screens/Select/FooterV2/FooterV2.cs b/osu.Game/Screens/Footer/ScreenFooter.cs similarity index 86% rename from osu.Game/Screens/Select/FooterV2/FooterV2.cs rename to osu.Game/Screens/Footer/ScreenFooter.cs index 370c28e2a5..01013bb466 100644 --- a/osu.Game/Screens/Select/FooterV2/FooterV2.cs +++ b/osu.Game/Screens/Footer/ScreenFooter.cs @@ -11,9 +11,9 @@ using osu.Game.Graphics.UserInterface; using osu.Game.Overlays; using osuTK; -namespace osu.Game.Screens.Select.FooterV2 +namespace osu.Game.Screens.Footer { - public partial class FooterV2 : InputBlockingContainer + public partial class ScreenFooter : InputBlockingContainer { //Should be 60, setting to 50 for now for the sake of matching the current BackButton height. private const int height = 50; @@ -23,7 +23,7 @@ namespace osu.Game.Screens.Select.FooterV2 /// The button to be added. /// The to be toggled by this button. - public void AddButton(FooterButtonV2 button, OverlayContainer? overlay = null) + public void AddButton(ScreenFooterButton button, OverlayContainer? overlay = null) { if (overlay != null) { @@ -46,9 +46,9 @@ namespace osu.Game.Screens.Select.FooterV2 } } - private FillFlowContainer buttons = null!; + private FillFlowContainer buttons = null!; - public FooterV2() + public ScreenFooter() { RelativeSizeAxes = Axes.X; Height = height; @@ -66,7 +66,7 @@ namespace osu.Game.Screens.Select.FooterV2 RelativeSizeAxes = Axes.Both, Colour = colourProvider.Background5 }, - buttons = new FillFlowContainer + buttons = new FillFlowContainer { Position = new Vector2(TwoLayerButton.SIZE_EXTENDED.X + padding, 10), Anchor = Anchor.BottomLeft, diff --git a/osu.Game/Screens/Select/FooterV2/FooterButtonV2.cs b/osu.Game/Screens/Footer/ScreenFooterButton.cs similarity index 97% rename from osu.Game/Screens/Select/FooterV2/FooterButtonV2.cs rename to osu.Game/Screens/Footer/ScreenFooterButton.cs index 80103242f8..b3b3c9a8ec 100644 --- a/osu.Game/Screens/Select/FooterV2/FooterButtonV2.cs +++ b/osu.Game/Screens/Footer/ScreenFooterButton.cs @@ -21,9 +21,9 @@ using osu.Game.Overlays; using osuTK; using osuTK.Graphics; -namespace osu.Game.Screens.Select.FooterV2 +namespace osu.Game.Screens.Footer { - public partial class FooterButtonV2 : OsuClickableContainer, IKeyBindingHandler + public partial class ScreenFooterButton : OsuClickableContainer, IKeyBindingHandler { // This should be 12 by design, but an extra allowance is added due to the corner radius specification. private const float shear_width = 13.5f; @@ -70,7 +70,7 @@ namespace osu.Game.Screens.Select.FooterV2 private readonly Box glowBox; private readonly Box flashLayer; - public FooterButtonV2() + public ScreenFooterButton() { Size = new Vector2(BUTTON_WIDTH, BUTTON_HEIGHT); diff --git a/osu.Game/Screens/Select/FooterV2/BeatmapOptionsPopover.cs b/osu.Game/Screens/SelectV2/Footer/BeatmapOptionsPopover.cs similarity index 96% rename from osu.Game/Screens/Select/FooterV2/BeatmapOptionsPopover.cs rename to osu.Game/Screens/SelectV2/Footer/BeatmapOptionsPopover.cs index d98164c306..f73be15a36 100644 --- a/osu.Game/Screens/Select/FooterV2/BeatmapOptionsPopover.cs +++ b/osu.Game/Screens/SelectV2/Footer/BeatmapOptionsPopover.cs @@ -20,24 +20,25 @@ using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterfaceV2; using osu.Game.Localisation; using osu.Game.Overlays; +using osu.Game.Screens.Select; using osuTK; using osuTK.Graphics; using osuTK.Input; using WebCommonStrings = osu.Game.Resources.Localisation.Web.CommonStrings; -namespace osu.Game.Screens.Select.FooterV2 +namespace osu.Game.Screens.SelectV2.Footer { public partial class BeatmapOptionsPopover : OsuPopover { private FillFlowContainer buttonFlow = null!; - private readonly FooterButtonOptionsV2 footerButton; + private readonly ScreenFooterButtonOptions footerButton; private WorkingBeatmap beatmapWhenOpening = null!; [Resolved] private IBindable beatmap { get; set; } = null!; - public BeatmapOptionsPopover(FooterButtonOptionsV2 footerButton) + public BeatmapOptionsPopover(ScreenFooterButtonOptions footerButton) { this.footerButton = footerButton; } diff --git a/osu.Game/Screens/Select/FooterV2/FooterButtonModsV2.cs b/osu.Game/Screens/SelectV2/Footer/ScreenFooterButtonMods.cs similarity index 98% rename from osu.Game/Screens/Select/FooterV2/FooterButtonModsV2.cs rename to osu.Game/Screens/SelectV2/Footer/ScreenFooterButtonMods.cs index 44db49b927..49961c60f8 100644 --- a/osu.Game/Screens/Select/FooterV2/FooterButtonModsV2.cs +++ b/osu.Game/Screens/SelectV2/Footer/ScreenFooterButtonMods.cs @@ -21,14 +21,15 @@ using osu.Game.Graphics.Sprites; using osu.Game.Localisation; using osu.Game.Overlays; using osu.Game.Rulesets.Mods; +using osu.Game.Screens.Footer; using osu.Game.Screens.Play.HUD; using osu.Game.Utils; using osuTK; using osuTK.Graphics; -namespace osu.Game.Screens.Select.FooterV2 +namespace osu.Game.Screens.SelectV2.Footer { - public partial class FooterButtonModsV2 : FooterButtonV2, IHasCurrentValue> + public partial class ScreenFooterButtonMods : ScreenFooterButton, IHasCurrentValue> { // todo: see https://github.com/ppy/osu-framework/issues/3271 private const float torus_scale_factor = 1.2f; diff --git a/osu.Game/Screens/Select/FooterV2/FooterButtonOptionsV2.cs b/osu.Game/Screens/SelectV2/Footer/ScreenFooterButtonOptions.cs similarity index 83% rename from osu.Game/Screens/Select/FooterV2/FooterButtonOptionsV2.cs rename to osu.Game/Screens/SelectV2/Footer/ScreenFooterButtonOptions.cs index 555215056a..74fe3e3d11 100644 --- a/osu.Game/Screens/Select/FooterV2/FooterButtonOptionsV2.cs +++ b/osu.Game/Screens/SelectV2/Footer/ScreenFooterButtonOptions.cs @@ -8,10 +8,11 @@ using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.UserInterface; using osu.Game.Graphics; using osu.Game.Input.Bindings; +using osu.Game.Screens.Footer; -namespace osu.Game.Screens.Select.FooterV2 +namespace osu.Game.Screens.SelectV2.Footer { - public partial class FooterButtonOptionsV2 : FooterButtonV2, IHasPopover + public partial class ScreenFooterButtonOptions : ScreenFooterButton, IHasPopover { [BackgroundDependencyLoader] private void load(OsuColour colour) diff --git a/osu.Game/Screens/Select/FooterV2/FooterButtonRandomV2.cs b/osu.Game/Screens/SelectV2/Footer/ScreenFooterButtonRandom.cs similarity index 97% rename from osu.Game/Screens/Select/FooterV2/FooterButtonRandomV2.cs rename to osu.Game/Screens/SelectV2/Footer/ScreenFooterButtonRandom.cs index 70d1c0c19e..e8e850a9ce 100644 --- a/osu.Game/Screens/Select/FooterV2/FooterButtonRandomV2.cs +++ b/osu.Game/Screens/SelectV2/Footer/ScreenFooterButtonRandom.cs @@ -10,12 +10,13 @@ using osu.Framework.Input.Events; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Input.Bindings; +using osu.Game.Screens.Footer; using osuTK; using osuTK.Input; -namespace osu.Game.Screens.Select.FooterV2 +namespace osu.Game.Screens.SelectV2.Footer { - public partial class FooterButtonRandomV2 : FooterButtonV2 + public partial class ScreenFooterButtonRandom : ScreenFooterButton { public Action? NextRandom { get; set; } public Action? PreviousRandom { get; set; }