From 6f1fff4ee7f990b36c4083dd867b0f4e8352267b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 2 Apr 2017 15:56:12 +0900 Subject: [PATCH 1/4] Update async load usage to new style. --- osu-framework | 2 +- osu.Desktop.VisualTests/VisualTestGame.cs | 2 +- osu.Desktop/OsuGameDesktop.cs | 2 +- .../Beatmaps/Drawables/BeatmapSetHeader.cs | 18 +- osu.Game/OsuGame.cs | 22 +-- osu.Game/Overlays/MusicController.cs | 10 +- osu.Game/Screens/BackgroundScreen.cs | 10 +- .../Backgrounds/BackgroundScreenBeatmap.cs | 2 +- osu.Game/Screens/Loader.cs | 4 +- osu.Game/Screens/Menu/Disclaimer.cs | 4 +- osu.Game/Screens/Menu/Intro.cs | 2 +- osu.Game/Screens/Menu/MainMenu.cs | 7 +- osu.Game/Screens/Play/Player.cs | 2 +- osu.Game/Screens/Play/PlayerLoader.cs | 2 +- osu.Game/Screens/Select/BeatmapInfoWedge.cs | 182 +++++++++--------- .../Select/Leaderboards/LeaderboardScore.cs | 31 ++- osu.Game/Screens/Select/PlaySongSelect.cs | 4 +- osu.Game/Users/UpdateableAvatar.cs | 10 +- 18 files changed, 146 insertions(+), 170 deletions(-) diff --git a/osu-framework b/osu-framework index bf6a3dc40176..84200e72acaa 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit bf6a3dc40176ee4f921012808070e014fc4a5779 +Subproject commit 84200e72acaacd6441ae81291aef251ac31cbd63 diff --git a/osu.Desktop.VisualTests/VisualTestGame.cs b/osu.Desktop.VisualTests/VisualTestGame.cs index 0392dc544325..e0d168390bae 100644 --- a/osu.Desktop.VisualTests/VisualTestGame.cs +++ b/osu.Desktop.VisualTests/VisualTestGame.cs @@ -14,7 +14,7 @@ protected override void LoadComplete() { base.LoadComplete(); - new BackgroundScreenDefault { Depth = 10 }.LoadAsync(this, AddInternal); + LoadComponentAsync(new BackgroundScreenDefault { Depth = 10 }, AddInternal); // Have to construct this here, rather than in the constructor, because // we depend on some dependencies to be loaded within OsuGameBase.load(). diff --git a/osu.Desktop/OsuGameDesktop.cs b/osu.Desktop/OsuGameDesktop.cs index 95870125e3e9..c2bb39ac4a39 100644 --- a/osu.Desktop/OsuGameDesktop.cs +++ b/osu.Desktop/OsuGameDesktop.cs @@ -29,7 +29,7 @@ protected override void LoadComplete() { base.LoadComplete(); - versionManager.LoadAsync(this); + LoadComponentAsync(versionManager); ScreenChanged += s => { if (!versionManager.IsAlive && s is Intro) diff --git a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs index e26dcac16b49..96747cd9d304 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs @@ -33,19 +33,15 @@ public BeatmapSetHeader(WorkingBeatmap beatmap) Children = new Drawable[] { - new DelayedLoadContainer - { - RelativeSizeAxes = Axes.Both, - TimeBeforeLoad = 300, - FinishedLoading = d => d.FadeInFromZero(400, EasingTypes.Out), - Children = new[] + new DelayedLoadContainer( + new PanelBackground(beatmap) { - new PanelBackground(beatmap) - { - RelativeSizeAxes = Axes.Both, - Depth = 1, - } + RelativeSizeAxes = Axes.Both, + OnLoadComplete = d => d.FadeInFromZero(400, EasingTypes.Out), } + ) + { + TimeBeforeLoad = 300, }, new FillFlowContainer { diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 8ac86c5c675c..d75f8b4d8e51 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -150,7 +150,7 @@ protected override void LoadComplete() } }); - (screenStack = new Loader()).LoadAsync(this, d => + LoadComponentAsync(screenStack = new Loader(), d => { screenStack.ModePushed += screenAdded; screenStack.Exited += screenRemoved; @@ -158,27 +158,27 @@ protected override void LoadComplete() }); //overlay elements - (chat = new ChatOverlay { Depth = 0 }).LoadAsync(this, overlayContent.Add); - (options = new OptionsOverlay { Depth = -1 }).LoadAsync(this, overlayContent.Add); - (musicController = new MusicController + LoadComponentAsync(chat = new ChatOverlay { Depth = 0 }, overlayContent.Add); + LoadComponentAsync(options = new OptionsOverlay { Depth = -1 }, overlayContent.Add); + LoadComponentAsync(musicController = new MusicController { Depth = -2, Position = new Vector2(0, Toolbar.HEIGHT), Anchor = Anchor.TopRight, Origin = Anchor.TopRight, - }).LoadAsync(this, overlayContent.Add); + }, overlayContent.Add); - (notificationManager = new NotificationManager + LoadComponentAsync(notificationManager = new NotificationManager { Depth = -2, Anchor = Anchor.TopRight, Origin = Anchor.TopRight, - }).LoadAsync(this, overlayContent.Add); + }, overlayContent.Add); - (dialogOverlay = new DialogOverlay + LoadComponentAsync(dialogOverlay = new DialogOverlay { Depth = -4, - }).LoadAsync(this, overlayContent.Add); + }, overlayContent.Add); Logger.NewEntry += entry => { @@ -195,12 +195,12 @@ protected override void LoadComplete() Dependencies.Cache(notificationManager); Dependencies.Cache(dialogOverlay); - (Toolbar = new Toolbar + LoadComponentAsync(Toolbar = new Toolbar { Depth = -3, OnHome = delegate { intro?.ChildScreen?.MakeCurrent(); }, OnPlayModeChange = m => PlayMode.Value = m, - }).LoadAsync(this, t => + }, t => { PlayMode.ValueChanged += delegate { Toolbar.SetGameMode(PlayMode.Value); }; PlayMode.TriggerChange(); diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index 2f8f0ab6500f..d119065173ee 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -347,12 +347,9 @@ private void updateDisplay(WorkingBeatmap beatmap, TransformDirection direction) } }); - dragContainer.Add(new AsyncLoadContainer + dragContainer.Add(new AsyncLoadContainer(new MusicControllerBackground(beatmap) { - RelativeSizeAxes = Axes.Both, - Depth = float.MaxValue, - Children = new[] { new MusicControllerBackground(beatmap) }, - FinishedLoading = d => + OnLoadComplete = d => { switch (direction) { @@ -370,6 +367,9 @@ private void updateDisplay(WorkingBeatmap beatmap, TransformDirection direction) currentBackground.Expire(); currentBackground = d; } + }) + { + Depth = float.MaxValue, }); }; } diff --git a/osu.Game/Screens/BackgroundScreen.cs b/osu.Game/Screens/BackgroundScreen.cs index 317199c6a982..e86bf9371cfa 100644 --- a/osu.Game/Screens/BackgroundScreen.cs +++ b/osu.Game/Screens/BackgroundScreen.cs @@ -27,21 +27,13 @@ protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) return false; } - private Framework.Game game; - - [BackgroundDependencyLoader] - private void load(Framework.Game game) - { - this.game = game; - } - public override bool Push(Screen screen) { // When trying to push a non-loaded GameMode, load it asynchronously and re-invoke Push // once it's done. if (screen.LoadState == LoadState.NotLoaded) { - screen.LoadAsync(game, d => Push((BackgroundScreen)d)); + LoadComponentAsync(screen, d => Push((BackgroundScreen)d)); return true; } diff --git a/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs b/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs index 6baccdf9c98f..ade860f35895 100644 --- a/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs +++ b/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs @@ -32,7 +32,7 @@ public WorkingBeatmap Beatmap { var newBackground = beatmap == null ? new Background(@"Backgrounds/bg1") : new BeatmapBackground(beatmap); - newBackground.LoadAsync(Game, delegate + LoadComponentAsync(newBackground, delegate { float newDepth = 0; if (background != null) diff --git a/osu.Game/Screens/Loader.cs b/osu.Game/Screens/Loader.cs index 41ca9df83bb0..30e1538b4728 100644 --- a/osu.Game/Screens/Loader.cs +++ b/osu.Game/Screens/Loader.cs @@ -20,9 +20,9 @@ public Loader() private void load(OsuGame game) { if (game.IsDeployedBuild) - new Disclaimer().LoadAsync(game, d => Push((Screen)d)); + LoadComponentAsync(new Disclaimer(), d => Push((Screen)d)); else - new Intro().LoadAsync(game, d => Push((Screen)d)); + LoadComponentAsync(new Intro(), d => Push((Screen)d)); } } } diff --git a/osu.Game/Screens/Menu/Disclaimer.cs b/osu.Game/Screens/Menu/Disclaimer.cs index bef98a2d57c2..46400670175c 100644 --- a/osu.Game/Screens/Menu/Disclaimer.cs +++ b/osu.Game/Screens/Menu/Disclaimer.cs @@ -88,9 +88,9 @@ public Disclaimer() } [BackgroundDependencyLoader] - private void load(OsuGame game, OsuColour colours) + private void load(OsuColour colours) { - (intro = new Intro()).LoadAsync(game); + LoadComponentAsync(intro = new Intro()); iconColour = colours.Yellow; } diff --git a/osu.Game/Screens/Menu/Intro.cs b/osu.Game/Screens/Menu/Intro.cs index 890b3f6970c6..ac926cba0cd4 100644 --- a/osu.Game/Screens/Menu/Intro.cs +++ b/osu.Game/Screens/Menu/Intro.cs @@ -76,7 +76,7 @@ protected override void OnEntering(Screen last) { bgm.Start(); - (mainMenu = new MainMenu()).LoadAsync(Game); + LoadComponentAsync(mainMenu = new MainMenu()); Scheduler.AddDelayed(delegate { diff --git a/osu.Game/Screens/Menu/MainMenu.cs b/osu.Game/Screens/Menu/MainMenu.cs index d19dd40938df..59528dad91fa 100644 --- a/osu.Game/Screens/Menu/MainMenu.cs +++ b/osu.Game/Screens/Menu/MainMenu.cs @@ -57,7 +57,7 @@ public MainMenu() [BackgroundDependencyLoader] private void load(OsuGame game) { - background.LoadAsync(game); + LoadComponentAsync(background); buttons.OnSettings = game.ToggleOptions; @@ -67,10 +67,7 @@ private void load(OsuGame game) private void preloadSongSelect() { if (songSelect == null) - { - songSelect = new PlaySongSelect(); - songSelect.LoadAsync(Game); - } + LoadComponentAsync(songSelect = new PlaySongSelect()); } private Screen consumeSongSelect() diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 73d397b24b4b..5bdb6293934b 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -225,7 +225,7 @@ public void Restart() var newPlayer = new Player(); - newPlayer.LoadAsync(Game, delegate + LoadComponentAsync(newPlayer, delegate { newPlayer.RestartCount = RestartCount + 1; ValidForResume = false; diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index d7667776975a..64d17fd5bbfa 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -50,7 +50,7 @@ private void load() Origin = Anchor.Centre, }); - player.LoadAsync(Game); + LoadComponentAsync(player); } protected override void OnEntering(Screen last) diff --git a/osu.Game/Screens/Select/BeatmapInfoWedge.cs b/osu.Game/Screens/Select/BeatmapInfoWedge.cs index 3cbf743c1537..d28267e3ab9c 100644 --- a/osu.Game/Screens/Select/BeatmapInfoWedge.cs +++ b/osu.Game/Screens/Select/BeatmapInfoWedge.cs @@ -103,111 +103,109 @@ public void UpdateBeatmap(WorkingBeatmap beatmap) labels.AddRange(Ruleset.GetRuleset(beatmap.BeatmapInfo.Mode).GetBeatmapStatistics(beatmap).Select(s => new InfoLabel(s))); } - Add(beatmapInfoContainer = new AsyncLoadContainer - { - FinishedLoading = d => - { - FadeIn(250); + AlwaysPresent = true; - lastContainer?.FadeOut(250); - lastContainer?.Expire(); - }, - Depth = newDepth, - RelativeSizeAxes = Axes.Both, - Children = new[] + Add(beatmapInfoContainer = new AsyncLoadContainer( + new BufferedContainer { - new BufferedContainer + OnLoadComplete = d => { - PixelSnapping = true, - CacheDrawnFrameBuffer = true, - Shear = -Shear, - RelativeSizeAxes = Axes.Both, - Children = new Drawable[] + FadeIn(250); + + lastContainer?.FadeOut(250); + lastContainer?.Expire(); + }, + PixelSnapping = true, + CacheDrawnFrameBuffer = true, + Shear = -Shear, + RelativeSizeAxes = Axes.Both, + Children = new Drawable[] + { + // We will create the white-to-black gradient by modulating transparency and having + // a black backdrop. This results in an sRGB-space gradient and not linear space, + // transitioning from white to black more perceptually uniformly. + new Box { - // We will create the white-to-black gradient by modulating transparency and having - // a black backdrop. This results in an sRGB-space gradient and not linear space, - // transitioning from white to black more perceptually uniformly. - new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.Black, - }, - // We use a container, such that we can set the colour gradient to go across the - // vertices of the masked container instead of the vertices of the (larger) sprite. - new Container + RelativeSizeAxes = Axes.Both, + Colour = Color4.Black, + }, + // We use a container, such that we can set the colour gradient to go across the + // vertices of the masked container instead of the vertices of the (larger) sprite. + new Container + { + RelativeSizeAxes = Axes.Both, + ColourInfo = ColourInfo.GradientVertical(Color4.White, Color4.White.Opacity(0.3f)), + Children = new[] { - RelativeSizeAxes = Axes.Both, - ColourInfo = ColourInfo.GradientVertical(Color4.White, Color4.White.Opacity(0.3f)), - Children = new[] + // Zoomed-in and cropped beatmap background + new BeatmapBackgroundSprite(beatmap) { - // Zoomed-in and cropped beatmap background - new BeatmapBackgroundSprite(beatmap) - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - FillMode = FillMode.Fill, - }, + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + FillMode = FillMode.Fill, }, }, - // Text for beatmap info - new FillFlowContainer + }, + // Text for beatmap info + new FillFlowContainer + { + Anchor = Anchor.BottomLeft, + Origin = Anchor.BottomLeft, + Direction = FillDirection.Vertical, + Margin = new MarginPadding { Top = 10, Left = 25, Right = 10, Bottom = 20 }, + AutoSizeAxes = Axes.Both, + Children = new Drawable[] { - Anchor = Anchor.BottomLeft, - Origin = Anchor.BottomLeft, - Direction = FillDirection.Vertical, - Margin = new MarginPadding { Top = 10, Left = 25, Right = 10, Bottom = 20 }, - AutoSizeAxes = Axes.Both, - Children = new Drawable[] + new OsuSpriteText { - new OsuSpriteText - { - Font = @"Exo2.0-MediumItalic", - Text = metadata.Artist + " -- " + metadata.Title, - TextSize = 28, - Shadow = true, - }, - new OsuSpriteText - { - Font = @"Exo2.0-MediumItalic", - Text = beatmapInfo.Version, - TextSize = 17, - Shadow = true, - }, - new FillFlowContainer + Font = @"Exo2.0-MediumItalic", + Text = metadata.Artist + " -- " + metadata.Title, + TextSize = 28, + Shadow = true, + }, + new OsuSpriteText + { + Font = @"Exo2.0-MediumItalic", + Text = beatmapInfo.Version, + TextSize = 17, + Shadow = true, + }, + new FillFlowContainer + { + Margin = new MarginPadding { Top = 10 }, + Direction = FillDirection.Horizontal, + AutoSizeAxes = Axes.Both, + Children = new[] { - Margin = new MarginPadding { Top = 10 }, - Direction = FillDirection.Horizontal, - AutoSizeAxes = Axes.Both, - Children = new[] + new OsuSpriteText { - new OsuSpriteText - { - Font = @"Exo2.0-Medium", - Text = "mapped by ", - TextSize = 15, - Shadow = true, - }, - new OsuSpriteText - { - Font = @"Exo2.0-Bold", - Text = metadata.Author, - TextSize = 15, - Shadow = true, - }, - } - }, - new FillFlowContainer - { - Margin = new MarginPadding { Top = 20 }, - Spacing = new Vector2(40, 0), - AutoSizeAxes = Axes.Both, - Children = labels - }, - } - }, - } + Font = @"Exo2.0-Medium", + Text = "mapped by ", + TextSize = 15, + Shadow = true, + }, + new OsuSpriteText + { + Font = @"Exo2.0-Bold", + Text = metadata.Author, + TextSize = 15, + Shadow = true, + }, + } + }, + new FillFlowContainer + { + Margin = new MarginPadding { Top = 20 }, + Spacing = new Vector2(40, 0), + AutoSizeAxes = Axes.Both, + Children = labels + }, + } + }, } - } + }) + { + Depth = newDepth, }); } diff --git a/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs b/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs index 9a169b1f10c1..70b3225a1f13 100644 --- a/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs +++ b/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs @@ -141,26 +141,23 @@ public LeaderboardScore(Score score, int rank) Padding = new MarginPadding(edge_margin), Children = new Drawable[] { - avatar = new DelayedLoadContainer - { - TimeBeforeLoad = 500, - FinishedLoading = d => d.FadeInFromZero(200), - Size = new Vector2(HEIGHT - edge_margin * 2, HEIGHT - edge_margin * 2), - Children = new Drawable[] + avatar = new DelayedLoadContainer( + new Avatar(Score.User ?? new User { Id = Score.UserID }) { - new Avatar(Score.User ?? new User { Id = Score.UserID }) + RelativeSizeAxes = Axes.Both, + CornerRadius = corner_radius, + Masking = true, + OnLoadComplete = d => d.FadeInFromZero(200), + EdgeEffect = new EdgeEffect { - RelativeSizeAxes = Axes.Both, - CornerRadius = corner_radius, - Masking = true, - EdgeEffect = new EdgeEffect - { - Type = EdgeEffectType.Shadow, - Radius = 1, - Colour = Color4.Black.Opacity(0.2f), - }, + Type = EdgeEffectType.Shadow, + Radius = 1, + Colour = Color4.Black.Opacity(0.2f), }, - } + }) + { + TimeBeforeLoad = 500, + Size = new Vector2(HEIGHT - edge_margin * 2, HEIGHT - edge_margin * 2), }, new Container { diff --git a/osu.Game/Screens/Select/PlaySongSelect.cs b/osu.Game/Screens/Select/PlaySongSelect.cs index fb7ed3809f12..78a8e4c17701 100644 --- a/osu.Game/Screens/Select/PlaySongSelect.cs +++ b/osu.Game/Screens/Select/PlaySongSelect.cs @@ -81,10 +81,10 @@ protected override void OnSelected() { if (player != null) return; - (player = new PlayerLoader(new Player + LoadComponentAsync(player = new PlayerLoader(new Player { Beatmap = Beatmap, //eagerly set this so it's present before push. - })).LoadAsync(Game, l => Push(player)); + }), l => Push(player)); } } } diff --git a/osu.Game/Users/UpdateableAvatar.cs b/osu.Game/Users/UpdateableAvatar.cs index 4fc22985255b..f42fd95d1474 100644 --- a/osu.Game/Users/UpdateableAvatar.cs +++ b/osu.Game/Users/UpdateableAvatar.cs @@ -40,15 +40,11 @@ private void updateAvatar() { displayedAvatar?.FadeOut(300); displayedAvatar?.Expire(); - Add(displayedAvatar = new AsyncLoadContainer + Add(displayedAvatar = new AsyncLoadContainer(new Avatar(user) { RelativeSizeAxes = Axes.Both, - FinishedLoading = d => d.FadeInFromZero(200), - Children = new[] - { - new Avatar(user) { RelativeSizeAxes = Axes.Both } - } - }); + OnLoadComplete = d => d.FadeInFromZero(200), + })); } } } \ No newline at end of file From bfa2e68bfba4f82aecaf9fa8a69fca07f307f91c Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 2 Apr 2017 16:17:13 +0900 Subject: [PATCH 2/4] Container->Wrapper. --- osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs | 2 +- osu.Game/Overlays/MusicController.cs | 2 +- osu.Game/Screens/Select/BeatmapInfoWedge.cs | 2 +- osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs | 2 +- osu.Game/Users/UpdateableAvatar.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs index 96747cd9d304..89399a56ff37 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs @@ -33,7 +33,7 @@ public BeatmapSetHeader(WorkingBeatmap beatmap) Children = new Drawable[] { - new DelayedLoadContainer( + new DelayedLoadWrapper( new PanelBackground(beatmap) { RelativeSizeAxes = Axes.Both, diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index d119065173ee..aa0ea1ae9b22 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -347,7 +347,7 @@ private void updateDisplay(WorkingBeatmap beatmap, TransformDirection direction) } }); - dragContainer.Add(new AsyncLoadContainer(new MusicControllerBackground(beatmap) + dragContainer.Add(new AsyncLoadWrapper(new MusicControllerBackground(beatmap) { OnLoadComplete = d => { diff --git a/osu.Game/Screens/Select/BeatmapInfoWedge.cs b/osu.Game/Screens/Select/BeatmapInfoWedge.cs index d28267e3ab9c..768cef46450c 100644 --- a/osu.Game/Screens/Select/BeatmapInfoWedge.cs +++ b/osu.Game/Screens/Select/BeatmapInfoWedge.cs @@ -105,7 +105,7 @@ public void UpdateBeatmap(WorkingBeatmap beatmap) AlwaysPresent = true; - Add(beatmapInfoContainer = new AsyncLoadContainer( + Add(beatmapInfoContainer = new AsyncLoadWrapper( new BufferedContainer { OnLoadComplete = d => diff --git a/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs b/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs index 70b3225a1f13..adcf8fd042f3 100644 --- a/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs +++ b/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs @@ -141,7 +141,7 @@ public LeaderboardScore(Score score, int rank) Padding = new MarginPadding(edge_margin), Children = new Drawable[] { - avatar = new DelayedLoadContainer( + avatar = new DelayedLoadWrapper( new Avatar(Score.User ?? new User { Id = Score.UserID }) { RelativeSizeAxes = Axes.Both, diff --git a/osu.Game/Users/UpdateableAvatar.cs b/osu.Game/Users/UpdateableAvatar.cs index f42fd95d1474..7d304e3bbc7e 100644 --- a/osu.Game/Users/UpdateableAvatar.cs +++ b/osu.Game/Users/UpdateableAvatar.cs @@ -40,7 +40,7 @@ private void updateAvatar() { displayedAvatar?.FadeOut(300); displayedAvatar?.Expire(); - Add(displayedAvatar = new AsyncLoadContainer(new Avatar(user) + Add(displayedAvatar = new AsyncLoadWrapper(new Avatar(user) { RelativeSizeAxes = Axes.Both, OnLoadComplete = d => d.FadeInFromZero(200), From a7f48e0edadca517bcccc65c707b958fffdc3940 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 2 Apr 2017 17:07:25 +0900 Subject: [PATCH 3/4] Update framework. --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 84200e72acaa..1c08c1fec496 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 84200e72acaacd6441ae81291aef251ac31cbd63 +Subproject commit 1c08c1fec496e9d64ba8f30ff0464cd5cdf567b6 From 263374a357a40fdcfd0fdd3f7d22cf5a7cb43d6e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 2 Apr 2017 17:11:31 +0900 Subject: [PATCH 4/4] Remove unnecessary using. --- osu.Game/Screens/BackgroundScreen.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game/Screens/BackgroundScreen.cs b/osu.Game/Screens/BackgroundScreen.cs index e86bf9371cfa..fd40141fcb94 100644 --- a/osu.Game/Screens/BackgroundScreen.cs +++ b/osu.Game/Screens/BackgroundScreen.cs @@ -3,7 +3,6 @@ using System; using System.Threading; -using osu.Framework.Allocation; using osu.Framework.Screens; using osu.Framework.Graphics; using osu.Framework.Input;