From 6ded53b3a91285e8f968c2a1772af347e16841f9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 30 Jul 2019 21:53:28 +0900 Subject: [PATCH] Reorder class --- .../SkinnableTestScene.cs | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/osu.Game.Rulesets.Osu.Tests/SkinnableTestScene.cs b/osu.Game.Rulesets.Osu.Tests/SkinnableTestScene.cs index ba31f15b3c..a2c058193b 100644 --- a/osu.Game.Rulesets.Osu.Tests/SkinnableTestScene.cs +++ b/osu.Game.Rulesets.Osu.Tests/SkinnableTestScene.cs @@ -16,30 +16,15 @@ namespace osu.Game.Rulesets.Osu.Tests { public abstract class SkinnableTestScene : OsuGridTestScene { - private static Skin getSkinFromResources(SkinManager skins, string name) - { - using (var storage = new DllResourceStore("osu.Game.Rulesets.Osu.Tests.dll")) - { - var tempName = Path.GetTempFileName(); - - File.Delete(tempName); - Directory.CreateDirectory(tempName); - - var files = storage.GetAvailableResources().Where(f => f.StartsWith($"Resources/{name}")); - - foreach (var file in files) - using (var stream = storage.GetStream(file)) - using (var newFile = File.Create(Path.Combine(tempName, Path.GetFileName(file)))) - stream.CopyTo(newFile); - - return skins.GetSkin(skins.Import(tempName).Result); - } - } - private Skin metricsSkin; private Skin defaultSkin; private Skin specialSkin; + protected SkinnableTestScene() + : base(2, 2) + { + } + [BackgroundDependencyLoader] private void load(AudioManager audio) { @@ -58,9 +43,24 @@ namespace osu.Game.Rulesets.Osu.Tests Cell(3).Child = new LocalSkinOverrideContainer(specialSkin) { RelativeSizeAxes = Axes.Both }.WithChild(creationFunction()); } - protected SkinnableTestScene() - : base(2, 2) + private static Skin getSkinFromResources(SkinManager skins, string name) { + using (var storage = new DllResourceStore("osu.Game.Rulesets.Osu.Tests.dll")) + { + var tempName = Path.GetTempFileName(); + + File.Delete(tempName); + Directory.CreateDirectory(tempName); + + var files = storage.GetAvailableResources().Where(f => f.StartsWith($"Resources/{name}")); + + foreach (var file in files) + using (var stream = storage.GetStream(file)) + using (var newFile = File.Create(Path.Combine(tempName, Path.GetFileName(file)))) + stream.CopyTo(newFile); + + return skins.GetSkin(skins.Import(tempName).Result); + } } } }