mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 12:33:01 +08:00
Rename LoadingAnimation to LoadingSpinner
This commit is contained in:
parent
623b78d675
commit
92f6f0207c
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
private Drawable dimContent;
|
||||
private LoadingLayer overlay;
|
||||
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(LoadingAnimation) };
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(LoadingSpinner) };
|
||||
|
||||
[SetUp]
|
||||
public void SetUp() => Schedule(() =>
|
||||
|
@ -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,
|
||||
|
@ -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.
|
||||
/// </summary>
|
||||
public class LoadingLayer : LoadingAnimation
|
||||
public class LoadingLayer : LoadingSpinner
|
||||
{
|
||||
private readonly Drawable dimTarget;
|
||||
|
||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
/// <summary>
|
||||
/// A loading spinner.
|
||||
/// </summary>
|
||||
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.
|
||||
/// </summary>
|
||||
/// <param name="withBox"></param>
|
||||
public LoadingAnimation(bool withBox = false)
|
||||
public LoadingSpinner(bool withBox = false)
|
||||
{
|
||||
Size = new Vector2(60);
|
||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
|
||||
private FillFlowContainer<LeaderboardScore> 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
|
||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Online
|
||||
/// </summary>
|
||||
public abstract class OnlineViewContainer : Container, IOnlineComponent
|
||||
{
|
||||
protected LoadingAnimation LoadingAnimation { get; private set; }
|
||||
protected LoadingSpinner LoadingSpinner { get; private set; }
|
||||
|
||||
protected override Container<Drawable> 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;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. 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<RulesetInfo>))]
|
||||
@ -179,7 +179,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
},
|
||||
}
|
||||
},
|
||||
loading = new LoadingAnimation
|
||||
loading = new LoadingSpinner
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
|
@ -37,7 +37,7 @@ namespace osu.Game.Overlays
|
||||
|
||||
private readonly List<DrawableChannel> loadedChannels = new List<DrawableChannel>();
|
||||
|
||||
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
|
||||
|
@ -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),
|
||||
},
|
||||
|
@ -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,
|
||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
public class SocialOverlay : SearchableListOverlay<SocialTab, SocialSortCriteria, SortDirection>
|
||||
{
|
||||
private readonly LoadingAnimation loading;
|
||||
private readonly LoadingSpinner loading;
|
||||
private FillFlowContainer<SocialPanel> 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 =>
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ namespace osu.Game.Screens.Play
|
||||
private readonly WorkingBeatmap beatmap;
|
||||
private readonly Bindable<IReadOnlyList<Mod>> mods;
|
||||
private readonly Drawable facade;
|
||||
private LoadingAnimation loading;
|
||||
private LoadingSpinner loading;
|
||||
private Sprite backgroundSprite;
|
||||
|
||||
public IBindable<IReadOnlyList<Mod>> 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
|
||||
|
Loading…
Reference in New Issue
Block a user