mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Remove unnecessary content private storage
This commit is contained in:
@ -21,8 +21,7 @@ namespace osu.Game.Online
|
|||||||
|
|
||||||
protected const double TRANSFORM_TIME = 300.0;
|
protected const double TRANSFORM_TIME = 300.0;
|
||||||
|
|
||||||
private readonly Container viewContent;
|
protected override Container<Drawable> Content { get; }
|
||||||
protected override Container<Drawable> Content => viewContent;
|
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
protected IAPIProvider API { get; private set; }
|
protected IAPIProvider API { get; private set; }
|
||||||
@ -31,7 +30,7 @@ namespace osu.Game.Online
|
|||||||
{
|
{
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
viewContent = new Container
|
Content = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
},
|
},
|
||||||
@ -48,21 +47,21 @@ namespace osu.Game.Online
|
|||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case APIState.Offline:
|
case APIState.Offline:
|
||||||
PopContentOut(viewContent);
|
PopContentOut(Content);
|
||||||
placeholder.ScaleTo(0.8f).Then().ScaleTo(1, 3 * TRANSFORM_TIME, Easing.OutQuint);
|
placeholder.ScaleTo(0.8f).Then().ScaleTo(1, 3 * TRANSFORM_TIME, Easing.OutQuint);
|
||||||
placeholder.FadeInFromZero(2 * TRANSFORM_TIME, Easing.OutQuint);
|
placeholder.FadeInFromZero(2 * TRANSFORM_TIME, Easing.OutQuint);
|
||||||
LoadingAnimation.Hide();
|
LoadingAnimation.Hide();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case APIState.Online:
|
case APIState.Online:
|
||||||
PopContentIn(viewContent);
|
PopContentIn(Content);
|
||||||
placeholder.FadeOut(TRANSFORM_TIME / 2, Easing.OutQuint);
|
placeholder.FadeOut(TRANSFORM_TIME / 2, Easing.OutQuint);
|
||||||
LoadingAnimation.Hide();
|
LoadingAnimation.Hide();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case APIState.Failing:
|
case APIState.Failing:
|
||||||
case APIState.Connecting:
|
case APIState.Connecting:
|
||||||
PopContentOut(viewContent);
|
PopContentOut(Content);
|
||||||
LoadingAnimation.Show();
|
LoadingAnimation.Show();
|
||||||
placeholder.FadeOut(TRANSFORM_TIME / 2, Easing.OutQuint);
|
placeholder.FadeOut(TRANSFORM_TIME / 2, Easing.OutQuint);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user