From 7d428875b8c0a4537ef3bde6531393ca3edc0459 Mon Sep 17 00:00:00 2001 From: FreezyLemon Date: Wed, 22 Nov 2017 15:46:04 +0100 Subject: [PATCH] Changed LoadWrapper back to DelayedLoadWrapper and fixed the implementation (dependent on framework change, delay now in ctor) --- osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs | 10 ++++------ osu.Game/Overlays/BeatmapSet/Header.cs | 8 ++++---- osu.Game/Overlays/Direct/DirectPanel.cs | 6 +++--- .../Screens/Select/Leaderboards/LeaderboardScore.cs | 6 +++--- osu.Game/Users/UpdateableAvatar.cs | 5 +++-- osu.Game/Users/UserPanel.cs | 2 +- 6 files changed, 18 insertions(+), 19 deletions(-) diff --git a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs index 3644c1b26f..ec39f86c5c 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs @@ -43,16 +43,14 @@ namespace osu.Game.Beatmaps.Drawables Children = new Drawable[] { - new LoadWrapper( + new DelayedLoadWrapper( new PanelBackground(beatmap) { RelativeSizeAxes = Axes.Both, OnLoadComplete = d => d.FadeInFromZero(400, Easing.Out), - } - ) - { - TimeBeforeLoad = 300, - }, + }, + 300 + ), new FillFlowContainer { Direction = FillDirection.Vertical, diff --git a/osu.Game/Overlays/BeatmapSet/Header.cs b/osu.Game/Overlays/BeatmapSet/Header.cs index b9d04e7b55..9bf14e1f90 100644 --- a/osu.Game/Overlays/BeatmapSet/Header.cs +++ b/osu.Game/Overlays/BeatmapSet/Header.cs @@ -31,7 +31,7 @@ namespace osu.Game.Overlays.BeatmapSet private readonly AuthorInfo author; public Details Details; - private LoadWrapper cover; + private DelayedLoadWrapper cover; public readonly BeatmapPicker Picker; @@ -52,7 +52,7 @@ namespace osu.Game.Overlays.BeatmapSet videoButtons.FadeTo(BeatmapSet.OnlineInfo.HasVideo ? 1 : 0, transition_duration); cover?.FadeOut(400, Easing.Out); - coverContainer.Add(cover = new LoadWrapper( + coverContainer.Add(cover = new DelayedLoadWrapper( new BeatmapSetCover(BeatmapSet) { Anchor = Anchor.Centre, @@ -60,10 +60,10 @@ namespace osu.Game.Overlays.BeatmapSet RelativeSizeAxes = Axes.Both, FillMode = FillMode.Fill, OnLoadComplete = d => d.FadeInFromZero(400, Easing.Out), - }) + }, + 300) { RelativeSizeAxes = Axes.Both, - TimeBeforeLoad = 300 }); } } diff --git a/osu.Game/Overlays/Direct/DirectPanel.cs b/osu.Game/Overlays/Direct/DirectPanel.cs index 98aa5ef0cb..bef8697552 100644 --- a/osu.Game/Overlays/Direct/DirectPanel.cs +++ b/osu.Game/Overlays/Direct/DirectPanel.cs @@ -219,7 +219,7 @@ namespace osu.Game.Overlays.Direct return icons; } - protected Drawable CreateBackground() => new LoadWrapper( + protected Drawable CreateBackground() => new DelayedLoadWrapper( new BeatmapSetCover(SetInfo) { Anchor = Anchor.Centre, @@ -231,10 +231,10 @@ namespace osu.Game.Overlays.Direct d.FadeInFromZero(400, Easing.Out); BlackBackground.Delay(400).FadeOut(); }, - }) + }, + 300) { RelativeSizeAxes = Axes.Both, - TimeBeforeLoad = 300 }; public class Statistic : FillFlowContainer diff --git a/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs b/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs index 92fc6aef2b..14cd7e6f07 100644 --- a/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs +++ b/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs @@ -99,7 +99,7 @@ namespace osu.Game.Screens.Select.Leaderboards Padding = new MarginPadding(edge_margin), Children = new Drawable[] { - avatar = new LoadWrapper( + avatar = new DelayedLoadWrapper( new Avatar(Score.User) { RelativeSizeAxes = Axes.Both, @@ -112,9 +112,9 @@ namespace osu.Game.Screens.Select.Leaderboards Radius = 1, Colour = Color4.Black.Opacity(0.2f), }, - }) + }, + 500) { - TimeBeforeLoad = 500, RelativeSizeAxes = Axes.None, Size = new Vector2(HEIGHT - edge_margin * 2, HEIGHT - edge_margin * 2), }, diff --git a/osu.Game/Users/UpdateableAvatar.cs b/osu.Game/Users/UpdateableAvatar.cs index 02018ee1f4..1700046653 100644 --- a/osu.Game/Users/UpdateableAvatar.cs +++ b/osu.Game/Users/UpdateableAvatar.cs @@ -40,12 +40,13 @@ namespace osu.Game.Users { displayedAvatar?.FadeOut(300); displayedAvatar?.Expire(); - Add(displayedAvatar = new LoadWrapper( + Add(displayedAvatar = new DelayedLoadWrapper( new Avatar(user) { RelativeSizeAxes = Axes.Both, OnLoadComplete = d => d.FadeInFromZero(200), - }) + }, + 500) ); } } diff --git a/osu.Game/Users/UserPanel.cs b/osu.Game/Users/UserPanel.cs index e4fdcb4c1b..923c62f8ef 100644 --- a/osu.Game/Users/UserPanel.cs +++ b/osu.Game/Users/UserPanel.cs @@ -58,7 +58,7 @@ namespace osu.Game.Users Children = new Drawable[] { - new LoadWrapper(new UserCoverBackground(user) + new DelayedLoadWrapper(new UserCoverBackground(user) { RelativeSizeAxes = Axes.Both, Anchor = Anchor.Centre,