diff --git a/osu.Desktop/Overlays/VersionManager.cs b/osu.Desktop/Overlays/VersionManager.cs
index 1129969694..740ad7c3be 100644
--- a/osu.Desktop/Overlays/VersionManager.cs
+++ b/osu.Desktop/Overlays/VersionManager.cs
@@ -2,6 +2,7 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
+using System.Threading.Tasks;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@@ -31,7 +32,7 @@ namespace osu.Desktop.Overlays
public override bool HandleMouseInput => false;
[BackgroundDependencyLoader]
- private void load(NotificationOverlay notification, OsuColour colours, TextureStore textures, OsuGameBase game, OsuConfigManager config, GameHost host)
+ private async Task load(NotificationOverlay notification, OsuColour colours, TextureStore textures, OsuGameBase game, OsuConfigManager config, GameHost host)
{
notificationOverlay = notification;
this.config = config;
@@ -86,7 +87,7 @@ namespace osu.Desktop.Overlays
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
- Texture = textures.Get(@"Menu/dev-build-footer"),
+ Texture = await textures.GetAsync(@"Menu/dev-build-footer"),
},
}
}
diff --git a/osu.Desktop/osu.Desktop.csproj b/osu.Desktop/osu.Desktop.csproj
index 180abd7fec..e2fc4d14f6 100644
--- a/osu.Desktop/osu.Desktop.csproj
+++ b/osu.Desktop/osu.Desktop.csproj
@@ -28,8 +28,8 @@
-
-
+
+
diff --git a/osu.Game.Rulesets.Catch/UI/CatcherArea.cs b/osu.Game.Rulesets.Catch/UI/CatcherArea.cs
index 4327abb96f..99d902d3e4 100644
--- a/osu.Game.Rulesets.Catch/UI/CatcherArea.cs
+++ b/osu.Game.Rulesets.Catch/UI/CatcherArea.cs
@@ -3,6 +3,7 @@
using System;
using System.Linq;
+using System.Threading.Tasks;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@@ -448,9 +449,9 @@ namespace osu.Game.Rulesets.Catch.UI
}
[BackgroundDependencyLoader]
- private void load(TextureStore textures)
+ private async Task load(TextureStore textures)
{
- Texture = textures.Get(@"Play/Catch/fruit-catcher-idle");
+ Texture = await textures.GetAsync(@"Play/Catch/fruit-catcher-idle");
}
}
}
diff --git a/osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs b/osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs
index 6bf63443b5..999f84ed8e 100644
--- a/osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs
+++ b/osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs
@@ -26,11 +26,11 @@ namespace osu.Game.Rulesets.Mania.UI
throw new ArgumentException("Can't have zero or fewer stages.");
GridContainer playfieldGrid;
- InternalChild = playfieldGrid = new GridContainer
+ AddInternal(playfieldGrid = new GridContainer
{
RelativeSizeAxes = Axes.Both,
Content = new[] { new Drawable[stageDefinitions.Count] }
- };
+ });
var normalColumnAction = ManiaAction.Key1;
var specialColumnAction = ManiaAction.Special1;
diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModRelax.cs b/osu.Game.Rulesets.Osu/Mods/OsuModRelax.cs
index 4047e057cb..f3b7d60cf0 100644
--- a/osu.Game.Rulesets.Osu/Mods/OsuModRelax.cs
+++ b/osu.Game.Rulesets.Osu/Mods/OsuModRelax.cs
@@ -28,7 +28,7 @@ namespace osu.Game.Rulesets.Osu.Mods
const float relax_leniency = 3;
- foreach (var drawable in playfield.HitObjects.AliveObjects)
+ foreach (var drawable in playfield.HitObjectContainer.AliveObjects)
{
if (!(drawable is DrawableOsuHitObject osuHit))
continue;
diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/DefaultCirclePiece.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/DefaultCirclePiece.cs
index 86b60c3443..c7c81756eb 100644
--- a/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/DefaultCirclePiece.cs
+++ b/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/DefaultCirclePiece.cs
@@ -1,6 +1,7 @@
// Copyright (c) 2007-2018 ppy Pty Ltd .
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
+using System.Threading.Tasks;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@@ -12,7 +13,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
public class DefaultCirclePiece : Container
{
[BackgroundDependencyLoader]
- private void load(TextureStore textures)
+ private async Task load(TextureStore textures)
{
RelativeSizeAxes = Axes.Both;
Children = new Drawable[]
@@ -21,7 +22,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
- Texture = textures.Get(@"Play/osu/disc"),
+ Texture = await textures.GetAsync(@"Play/osu/disc"),
},
new TrianglesPiece
{
diff --git a/osu.Game.Rulesets.Osu/UI/Cursor/CursorTrail.cs b/osu.Game.Rulesets.Osu/UI/Cursor/CursorTrail.cs
index abcd1ddbda..4b981dc406 100644
--- a/osu.Game.Rulesets.Osu/UI/Cursor/CursorTrail.cs
+++ b/osu.Game.Rulesets.Osu/UI/Cursor/CursorTrail.cs
@@ -4,6 +4,7 @@
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
+using System.Threading.Tasks;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.OpenGL.Buffers;
@@ -79,10 +80,10 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => true;
[BackgroundDependencyLoader]
- private void load(ShaderManager shaders, TextureStore textures)
+ private async Task load(ShaderManager shaders, TextureStore textures)
{
shader = shaders?.Load(@"CursorTrail", FragmentShaderDescriptor.TEXTURE);
- texture = textures.Get(@"Cursor/cursortrail");
+ texture = await textures.GetAsync(@"Cursor/cursortrail");
Scale = new Vector2(1 / texture.ScaleAdjust);
}
diff --git a/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs b/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs
index 703d8764fc..61937a535c 100644
--- a/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs
+++ b/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs
@@ -61,7 +61,7 @@ namespace osu.Game.Rulesets.Osu.UI
public override void PostProcess()
{
- connectionLayer.HitObjects = HitObjects.Objects.Select(d => d.HitObject).OfType();
+ connectionLayer.HitObjects = HitObjectContainer.Objects.Select(d => d.HitObject).OfType();
}
private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)
diff --git a/osu.Game.Rulesets.Taiko/UI/InputDrum.cs b/osu.Game.Rulesets.Taiko/UI/InputDrum.cs
index 524535bfde..f525ce0ff3 100644
--- a/osu.Game.Rulesets.Taiko/UI/InputDrum.cs
+++ b/osu.Game.Rulesets.Taiko/UI/InputDrum.cs
@@ -2,6 +2,7 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
+using System.Threading.Tasks;
using OpenTK;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
@@ -130,12 +131,12 @@ namespace osu.Game.Rulesets.Taiko.UI
}
[BackgroundDependencyLoader]
- private void load(TextureStore textures, OsuColour colours)
+ private async Task load(TextureStore textures, OsuColour colours)
{
- rim.Texture = textures.Get(@"Play/Taiko/taiko-drum-outer");
- rimHit.Texture = textures.Get(@"Play/Taiko/taiko-drum-outer-hit");
- centre.Texture = textures.Get(@"Play/Taiko/taiko-drum-inner");
- centreHit.Texture = textures.Get(@"Play/Taiko/taiko-drum-inner-hit");
+ rim.Texture = await textures.GetAsync(@"Play/Taiko/taiko-drum-outer");
+ rimHit.Texture = await textures.GetAsync(@"Play/Taiko/taiko-drum-outer-hit");
+ centre.Texture = await textures.GetAsync(@"Play/Taiko/taiko-drum-inner");
+ centreHit.Texture = await textures.GetAsync(@"Play/Taiko/taiko-drum-inner-hit");
rimHit.Colour = colours.Blue;
centreHit.Colour = colours.Pink;
diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs
index 774a80049b..1adbb4a389 100644
--- a/osu.Game/Beatmaps/BeatmapManager.cs
+++ b/osu.Game/Beatmaps/BeatmapManager.cs
@@ -319,17 +319,17 @@ namespace osu.Game.Beatmaps
///
/// This is a temporary method and will likely be replaced by a full-fledged (and more correctly placed) migration process in the future.
///
- public async Task ImportFromStable()
+ public Task ImportFromStable()
{
var stable = GetStableStorage?.Invoke();
if (stable == null)
{
Logger.Log("No osu!stable installation available!", LoggingTarget.Information, LogLevel.Error);
- return;
+ return Task.CompletedTask;
}
- await Task.Factory.StartNew(() => Import(stable.GetDirectories("Songs").Select(f => stable.GetFullPath(f)).ToArray()), TaskCreationOptions.LongRunning);
+ return Task.Factory.StartNew(() => Import(stable.GetDirectories("Songs").Select(f => stable.GetFullPath(f)).ToArray()), TaskCreationOptions.LongRunning);
}
///
diff --git a/osu.Game/Beatmaps/Drawables/BeatmapSetCover.cs b/osu.Game/Beatmaps/Drawables/BeatmapSetCover.cs
index 883c05f1e4..9bba589f59 100644
--- a/osu.Game/Beatmaps/Drawables/BeatmapSetCover.cs
+++ b/osu.Game/Beatmaps/Drawables/BeatmapSetCover.cs
@@ -2,6 +2,7 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
+using System.Threading.Tasks;
using osu.Framework.Allocation;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
@@ -23,7 +24,7 @@ namespace osu.Game.Beatmaps.Drawables
}
[BackgroundDependencyLoader]
- private void load(TextureStore textures)
+ private async Task load(TextureStore textures)
{
string resource = null;
@@ -41,7 +42,7 @@ namespace osu.Game.Beatmaps.Drawables
}
if (resource != null)
- Texture = textures.Get(resource);
+ Texture = await textures.GetAsync(resource);
}
}
diff --git a/osu.Game/Beatmaps/WorkingBeatmap.cs b/osu.Game/Beatmaps/WorkingBeatmap.cs
index 6c906bb1e4..085c591fce 100644
--- a/osu.Game/Beatmaps/WorkingBeatmap.cs
+++ b/osu.Game/Beatmaps/WorkingBeatmap.cs
@@ -67,7 +67,7 @@ namespace osu.Game.Beatmaps
public bool BeatmapLoaded => beatmap.IsResultAvailable;
public IBeatmap Beatmap => beatmap.Value.Result;
- public async Task GetBeatmapAsync() => await beatmap.Value;
+ public Task GetBeatmapAsync() => beatmap.Value;
private readonly AsyncLazy beatmap;
private IBeatmap populateBeatmap()
@@ -138,14 +138,14 @@ namespace osu.Game.Beatmaps
public bool BackgroundLoaded => background.IsResultAvailable;
public Texture Background => background.Value.Result;
- public async Task GetBackgroundAsync() => await background.Value;
+ public Task GetBackgroundAsync() => background.Value;
private AsyncLazy background;
private Texture populateBackground() => GetBackground();
public bool TrackLoaded => track.IsResultAvailable;
public Track Track => track.Value.Result;
- public async Task
-
-
+
+
-
+
diff --git a/osu.TestProject.props b/osu.TestProject.props
index a73a4f8ce2..58de6ec030 100644
--- a/osu.TestProject.props
+++ b/osu.TestProject.props
@@ -11,7 +11,7 @@
-
+