diff --git a/osu.Game.Tests/Visual/Online/TestSceneOnlineViewContainer.cs b/osu.Game.Tests/Visual/Online/TestSceneOnlineViewContainer.cs index 3c2735ca56..9591d53b24 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneOnlineViewContainer.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneOnlineViewContainer.cs @@ -35,7 +35,7 @@ namespace osu.Game.Tests.Visual.Online AddStep("set status to online", () => ((DummyAPIAccess)API).State = APIState.Online); AddUntilStep("children are visible", () => onlineView.ViewTarget.IsPresent); - AddUntilStep("loading animation is not visible", () => !onlineView.LoadingAnimation.IsPresent); + AddUntilStep("loading animation is not visible", () => !onlineView.LoadingSpinner.IsPresent); } [Test] @@ -44,7 +44,7 @@ namespace osu.Game.Tests.Visual.Online AddStep("set status to offline", () => ((DummyAPIAccess)API).State = APIState.Offline); AddUntilStep("children are not visible", () => !onlineView.ViewTarget.IsPresent); - AddUntilStep("loading animation is not visible", () => !onlineView.LoadingAnimation.IsPresent); + AddUntilStep("loading animation is not visible", () => !onlineView.LoadingSpinner.IsPresent); } [Test] @@ -53,7 +53,7 @@ namespace osu.Game.Tests.Visual.Online AddStep("set status to connecting", () => ((DummyAPIAccess)API).State = APIState.Connecting); AddUntilStep("children are not visible", () => !onlineView.ViewTarget.IsPresent); - AddUntilStep("loading animation is visible", () => onlineView.LoadingAnimation.IsPresent); + AddUntilStep("loading animation is visible", () => onlineView.LoadingSpinner.IsPresent); } [Test] @@ -62,12 +62,12 @@ namespace osu.Game.Tests.Visual.Online AddStep("set status to failing", () => ((DummyAPIAccess)API).State = APIState.Failing); AddUntilStep("children are not visible", () => !onlineView.ViewTarget.IsPresent); - AddUntilStep("loading animation is visible", () => onlineView.LoadingAnimation.IsPresent); + AddUntilStep("loading animation is visible", () => onlineView.LoadingSpinner.IsPresent); } private class TestOnlineViewContainer : OnlineViewContainer { - public new LoadingAnimation LoadingAnimation => base.LoadingAnimation; + public new LoadingSpinner LoadingSpinner => base.LoadingSpinner; public CompositeDrawable ViewTarget => base.Content; diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneLoadingAnimation.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneLoadingAnimation.cs index b0233d35f9..cdb20b9935 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestSceneLoadingAnimation.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneLoadingAnimation.cs @@ -13,7 +13,7 @@ namespace osu.Game.Tests.Visual.UserInterface public TestSceneLoadingAnimation() : base(2, 2) { - LoadingAnimation loading; + LoadingSpinner loading; Cell(0).AddRange(new Drawable[] { @@ -22,7 +22,7 @@ namespace osu.Game.Tests.Visual.UserInterface Colour = Color4.Black, RelativeSizeAxes = Axes.Both }, - loading = new LoadingAnimation() + loading = new LoadingSpinner() }); loading.Show(); @@ -34,7 +34,7 @@ namespace osu.Game.Tests.Visual.UserInterface Colour = Color4.White, RelativeSizeAxes = Axes.Both }, - loading = new LoadingAnimation() + loading = new LoadingSpinner() }); loading.Show(); @@ -46,14 +46,14 @@ namespace osu.Game.Tests.Visual.UserInterface Colour = Color4.Gray, RelativeSizeAxes = Axes.Both }, - loading = new LoadingAnimation() + loading = new LoadingSpinner() }); loading.Show(); Cell(3).AddRange(new Drawable[] { - loading = new LoadingAnimation() + loading = new LoadingSpinner() }); Scheduler.AddDelayed(() => loading.ToggleVisibility(), 200, true); diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneLoadingLayer.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneLoadingLayer.cs index 0f49835742..4636c74ca9 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestSceneLoadingLayer.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneLoadingLayer.cs @@ -19,7 +19,7 @@ namespace osu.Game.Tests.Visual.UserInterface private Drawable dimContent; private LoadingLayer overlay; - public override IReadOnlyList RequiredTypes => new[] { typeof(LoadingAnimation) }; + public override IReadOnlyList RequiredTypes => new[] { typeof(LoadingSpinner) }; [SetUp] public void SetUp() => Schedule(() => diff --git a/osu.Game/Graphics/UserInterface/LoadingButton.cs b/osu.Game/Graphics/UserInterface/LoadingButton.cs index 49ec18ce8e..81dc023d7e 100644 --- a/osu.Game/Graphics/UserInterface/LoadingButton.cs +++ b/osu.Game/Graphics/UserInterface/LoadingButton.cs @@ -40,14 +40,14 @@ namespace osu.Game.Graphics.UserInterface set => loading.Size = value; } - private readonly LoadingAnimation loading; + private readonly LoadingSpinner loading; protected LoadingButton() { AddRange(new[] { CreateContent(), - loading = new LoadingAnimation + loading = new LoadingSpinner { Anchor = Anchor.Centre, Origin = Anchor.Centre, diff --git a/osu.Game/Graphics/UserInterface/LoadingLayer.cs b/osu.Game/Graphics/UserInterface/LoadingLayer.cs index a7b39c77fa..23906e76b9 100644 --- a/osu.Game/Graphics/UserInterface/LoadingLayer.cs +++ b/osu.Game/Graphics/UserInterface/LoadingLayer.cs @@ -15,7 +15,7 @@ namespace osu.Game.Graphics.UserInterface /// Also optionally dims target elements. /// Useful for disabling all elements in a form and showing we are waiting on a response, for instance. /// - public class LoadingLayer : LoadingAnimation + public class LoadingLayer : LoadingSpinner { private readonly Drawable dimTarget; diff --git a/osu.Game/Graphics/UserInterface/LoadingAnimation.cs b/osu.Game/Graphics/UserInterface/LoadingSpinner.cs similarity index 96% rename from osu.Game/Graphics/UserInterface/LoadingAnimation.cs rename to osu.Game/Graphics/UserInterface/LoadingSpinner.cs index 265c93bce3..4f42d1d8c8 100644 --- a/osu.Game/Graphics/UserInterface/LoadingAnimation.cs +++ b/osu.Game/Graphics/UserInterface/LoadingSpinner.cs @@ -13,7 +13,7 @@ namespace osu.Game.Graphics.UserInterface /// /// A loading spinner. /// - public class LoadingAnimation : VisibilityContainer + public class LoadingSpinner : VisibilityContainer { private readonly SpriteIcon spinner; @@ -27,7 +27,7 @@ namespace osu.Game.Graphics.UserInterface /// Constuct a new loading spinner. /// /// - public LoadingAnimation(bool withBox = false) + public LoadingSpinner(bool withBox = false) { Size = new Vector2(60); diff --git a/osu.Game/Online/Leaderboards/Leaderboard.cs b/osu.Game/Online/Leaderboards/Leaderboard.cs index 71859d3aeb..e2a817aaff 100644 --- a/osu.Game/Online/Leaderboards/Leaderboard.cs +++ b/osu.Game/Online/Leaderboards/Leaderboard.cs @@ -30,7 +30,7 @@ namespace osu.Game.Online.Leaderboards private FillFlowContainer scrollFlow; - private readonly LoadingAnimation loading; + private readonly LoadingSpinner loading; private ScheduledDelegate showScoresDelegate; private CancellationTokenSource showScoresCancellationSource; @@ -202,7 +202,7 @@ namespace osu.Game.Online.Leaderboards } }, }, - loading = new LoadingAnimation(), + loading = new LoadingSpinner(), placeholderContainer = new Container { RelativeSizeAxes = Axes.Both diff --git a/osu.Game/Online/OnlineViewContainer.cs b/osu.Game/Online/OnlineViewContainer.cs index 689c1c0afb..b52e3d9e3c 100644 --- a/osu.Game/Online/OnlineViewContainer.cs +++ b/osu.Game/Online/OnlineViewContainer.cs @@ -16,7 +16,7 @@ namespace osu.Game.Online /// public abstract class OnlineViewContainer : Container, IOnlineComponent { - protected LoadingAnimation LoadingAnimation { get; private set; } + protected LoadingSpinner LoadingSpinner { get; private set; } protected override Container Content { get; } = new Container { RelativeSizeAxes = Axes.Both }; @@ -41,7 +41,7 @@ namespace osu.Game.Online { Content, placeholder = new LoginPlaceholder(placeholderMessage), - LoadingAnimation = new LoadingAnimation + LoadingSpinner = new LoadingSpinner { Alpha = 0, } @@ -63,19 +63,19 @@ namespace osu.Game.Online PopContentOut(Content); placeholder.ScaleTo(0.8f).Then().ScaleTo(1, 3 * transform_duration, Easing.OutQuint); placeholder.FadeInFromZero(2 * transform_duration, Easing.OutQuint); - LoadingAnimation.Hide(); + LoadingSpinner.Hide(); break; case APIState.Online: PopContentIn(Content); placeholder.FadeOut(transform_duration / 2, Easing.OutQuint); - LoadingAnimation.Hide(); + LoadingSpinner.Hide(); break; case APIState.Failing: case APIState.Connecting: PopContentOut(Content); - LoadingAnimation.Show(); + LoadingSpinner.Show(); placeholder.FadeOut(transform_duration / 2, Easing.OutQuint); break; } diff --git a/osu.Game/Overlays/BeatmapSet/Header.cs b/osu.Game/Overlays/BeatmapSet/Header.cs index c1e9ce2008..29c259b7f8 100644 --- a/osu.Game/Overlays/BeatmapSet/Header.cs +++ b/osu.Game/Overlays/BeatmapSet/Header.cs @@ -1,4 +1,4 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Linq; @@ -45,7 +45,7 @@ namespace osu.Game.Overlays.BeatmapSet private readonly FavouriteButton favouriteButton; private readonly FillFlowContainer fadeContent; - private readonly LoadingAnimation loading; + private readonly LoadingSpinner loading; private readonly BeatmapSetHeader beatmapSetHeader; [Cached(typeof(IBindable))] @@ -179,7 +179,7 @@ namespace osu.Game.Overlays.BeatmapSet }, } }, - loading = new LoadingAnimation + loading = new LoadingSpinner { Anchor = Anchor.Centre, Origin = Anchor.Centre, diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index bdc241a437..34afc3c431 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -37,7 +37,7 @@ namespace osu.Game.Overlays private readonly List loadedChannels = new List(); - private LoadingAnimation loading; + private LoadingSpinner loading; private FocusedTextBox textbox; @@ -146,7 +146,7 @@ namespace osu.Game.Overlays } } }, - loading = new LoadingAnimation(), + loading = new LoadingSpinner(), } }, tabsArea = new TabsArea diff --git a/osu.Game/Overlays/Direct/PlayButton.cs b/osu.Game/Overlays/Direct/PlayButton.cs index 10abe15177..d9f335b6a7 100644 --- a/osu.Game/Overlays/Direct/PlayButton.cs +++ b/osu.Game/Overlays/Direct/PlayButton.cs @@ -42,7 +42,7 @@ namespace osu.Game.Overlays.Direct private Color4 hoverColour; private readonly SpriteIcon icon; - private readonly LoadingAnimation loadingAnimation; + private readonly LoadingSpinner loadingSpinner; private const float transition_duration = 500; @@ -53,12 +53,12 @@ namespace osu.Game.Overlays.Direct if (value) { icon.FadeTo(0.5f, transition_duration, Easing.OutQuint); - loadingAnimation.Show(); + loadingSpinner.Show(); } else { icon.FadeTo(1, transition_duration, Easing.OutQuint); - loadingAnimation.Hide(); + loadingSpinner.Hide(); } } } @@ -76,7 +76,7 @@ namespace osu.Game.Overlays.Direct RelativeSizeAxes = Axes.Both, Icon = FontAwesome.Solid.Play, }, - loadingAnimation = new LoadingAnimation + loadingSpinner = new LoadingSpinner { Size = new Vector2(15), }, diff --git a/osu.Game/Overlays/Settings/Sections/General/LoginSettings.cs b/osu.Game/Overlays/Settings/Sections/General/LoginSettings.cs index c55183772b..bf0e073350 100644 --- a/osu.Game/Overlays/Settings/Sections/General/LoginSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/General/LoginSettings.cs @@ -95,7 +95,7 @@ namespace osu.Game.Overlays.Settings.Sections.General Children = new Drawable[] { - new LoadingAnimation + new LoadingSpinner { State = { Value = Visibility.Visible }, Anchor = Anchor.TopCentre, diff --git a/osu.Game/Overlays/SocialOverlay.cs b/osu.Game/Overlays/SocialOverlay.cs index 9a523bc1bc..54c978738d 100644 --- a/osu.Game/Overlays/SocialOverlay.cs +++ b/osu.Game/Overlays/SocialOverlay.cs @@ -24,7 +24,7 @@ namespace osu.Game.Overlays { public class SocialOverlay : SearchableListOverlay { - private readonly LoadingAnimation loading; + private readonly LoadingSpinner loading; private FillFlowContainer panels; protected override Color4 BackgroundColour => OsuColour.FromHex(@"60284b"); @@ -54,7 +54,7 @@ namespace osu.Game.Overlays public SocialOverlay() : base(OverlayColourScheme.Pink) { - Add(loading = new LoadingAnimation()); + Add(loading = new LoadingSpinner()); Filter.Search.Current.ValueChanged += text => { diff --git a/osu.Game/Screens/Play/BeatmapMetadataDisplay.cs b/osu.Game/Screens/Play/BeatmapMetadataDisplay.cs index 074341226e..77ee52f23e 100644 --- a/osu.Game/Screens/Play/BeatmapMetadataDisplay.cs +++ b/osu.Game/Screens/Play/BeatmapMetadataDisplay.cs @@ -53,7 +53,7 @@ namespace osu.Game.Screens.Play private readonly WorkingBeatmap beatmap; private readonly Bindable> mods; private readonly Drawable facade; - private LoadingAnimation loading; + private LoadingSpinner loading; private Sprite backgroundSprite; public IBindable> Mods => mods; @@ -138,7 +138,7 @@ namespace osu.Game.Screens.Play Anchor = Anchor.Centre, FillMode = FillMode.Fill, }, - loading = new LoadingAnimation { Scale = new Vector2(1.3f) } + loading = new LoadingSpinner { Scale = new Vector2(1.3f) } } }, new OsuSpriteText