diff --git a/osu.Desktop/Updater/SquirrelUpdateManager.cs b/osu.Desktop/Updater/SquirrelUpdateManager.cs index 9681350ade..e2c7a5e892 100644 --- a/osu.Desktop/Updater/SquirrelUpdateManager.cs +++ b/osu.Desktop/Updater/SquirrelUpdateManager.cs @@ -2,8 +2,6 @@ // See the LICENCE file in the repository root for full licence text. using System; -using System.IO; -using System.Reflection; using System.Threading.Tasks; using osu.Framework.Allocation; using osu.Framework.Graphics; @@ -169,23 +167,19 @@ namespace osu.Desktop.Updater private class SquirrelLogger : Splat.ILogger, IDisposable { - private readonly string path; - private readonly object locker = new object(); public LogLevel Level { get; set; } = LogLevel.Info; - public SquirrelLogger() - { - var file = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location ?? Directory.GetCurrentDirectory()), "SquirrelSetupUpdater.log"); - if (File.Exists(file)) File.Delete(file); - path = file; - } + private Logger logger; public void Write(string message, LogLevel logLevel) { if (logLevel < Level) return; - lock (locker) File.AppendAllText(path, message + "\r\n"); + if (logger == null) + logger = Logger.GetLogger("updater"); + + logger.Add(message); } public void Dispose() diff --git a/osu.Game.Rulesets.Catch.Tests/TestCaseAutoJuiceStream.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneAutoJuiceStream.cs similarity index 94% rename from osu.Game.Rulesets.Catch.Tests/TestCaseAutoJuiceStream.cs rename to osu.Game.Rulesets.Catch.Tests/TestSceneAutoJuiceStream.cs index 102afa9ca6..9cec0d280d 100644 --- a/osu.Game.Rulesets.Catch.Tests/TestCaseAutoJuiceStream.cs +++ b/osu.Game.Rulesets.Catch.Tests/TestSceneAutoJuiceStream.cs @@ -13,9 +13,9 @@ using osuTK; namespace osu.Game.Rulesets.Catch.Tests { - public class TestCaseAutoJuiceStream : PlayerTestCase + public class TestSceneAutoJuiceStream : PlayerTestScene { - public TestCaseAutoJuiceStream() + public TestSceneAutoJuiceStream() : base(new CatchRuleset()) { } diff --git a/osu.Game.Rulesets.Catch.Tests/TestCaseBananaShower.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneBananaShower.cs similarity index 93% rename from osu.Game.Rulesets.Catch.Tests/TestCaseBananaShower.cs rename to osu.Game.Rulesets.Catch.Tests/TestSceneBananaShower.cs index d413b53d17..035bbe4b4e 100644 --- a/osu.Game.Rulesets.Catch.Tests/TestCaseBananaShower.cs +++ b/osu.Game.Rulesets.Catch.Tests/TestSceneBananaShower.cs @@ -13,7 +13,7 @@ using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Catch.Tests { [TestFixture] - public class TestCaseBananaShower : PlayerTestCase + public class TestSceneBananaShower : PlayerTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -24,7 +24,7 @@ namespace osu.Game.Rulesets.Catch.Tests typeof(DrawableCatchRuleset), }; - public TestCaseBananaShower() + public TestSceneBananaShower() : base(new CatchRuleset()) { } diff --git a/osu.Game.Rulesets.Catch.Tests/TestCaseCatchPlayer.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneCatchPlayer.cs similarity index 78% rename from osu.Game.Rulesets.Catch.Tests/TestCaseCatchPlayer.cs rename to osu.Game.Rulesets.Catch.Tests/TestSceneCatchPlayer.cs index 5b242d05d7..9836a7811a 100644 --- a/osu.Game.Rulesets.Catch.Tests/TestCaseCatchPlayer.cs +++ b/osu.Game.Rulesets.Catch.Tests/TestSceneCatchPlayer.cs @@ -7,9 +7,9 @@ using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Catch.Tests { [TestFixture] - public class TestCaseCatchPlayer : PlayerTestCase + public class TestSceneCatchPlayer : PlayerTestScene { - public TestCaseCatchPlayer() + public TestSceneCatchPlayer() : base(new CatchRuleset()) { } diff --git a/osu.Game.Rulesets.Catch.Tests/TestCaseCatchStacker.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneCatchStacker.cs similarity index 91% rename from osu.Game.Rulesets.Catch.Tests/TestCaseCatchStacker.cs rename to osu.Game.Rulesets.Catch.Tests/TestSceneCatchStacker.cs index 5a16a23a4e..7d7528372a 100644 --- a/osu.Game.Rulesets.Catch.Tests/TestCaseCatchStacker.cs +++ b/osu.Game.Rulesets.Catch.Tests/TestSceneCatchStacker.cs @@ -9,9 +9,9 @@ using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Catch.Tests { [TestFixture] - public class TestCaseCatchStacker : PlayerTestCase + public class TestSceneCatchStacker : PlayerTestScene { - public TestCaseCatchStacker() + public TestSceneCatchStacker() : base(new CatchRuleset()) { } diff --git a/osu.Game.Rulesets.Catch.Tests/TestCaseCatcherArea.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneCatcherArea.cs similarity index 95% rename from osu.Game.Rulesets.Catch.Tests/TestCaseCatcherArea.cs rename to osu.Game.Rulesets.Catch.Tests/TestSceneCatcherArea.cs index 5e3fcd239f..3ae6886c31 100644 --- a/osu.Game.Rulesets.Catch.Tests/TestCaseCatcherArea.cs +++ b/osu.Game.Rulesets.Catch.Tests/TestSceneCatcherArea.cs @@ -13,7 +13,7 @@ using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Catch.Tests { [TestFixture] - public class TestCaseCatcherArea : OsuTestCase + public class TestSceneCatcherArea : OsuTestScene { private RulesetInfo catchRuleset; private TestCatcherArea catcherArea; @@ -23,7 +23,7 @@ namespace osu.Game.Rulesets.Catch.Tests typeof(CatcherArea), }; - public TestCaseCatcherArea() + public TestSceneCatcherArea() { AddSliderStep("CircleSize", 0, 8, 5, createCatcher); AddToggleStep("Hyperdash", t => catcherArea.ToggleHyperDash(t)); diff --git a/osu.Game.Rulesets.Catch.Tests/TestCaseFruitObjects.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneFruitObjects.cs similarity index 96% rename from osu.Game.Rulesets.Catch.Tests/TestCaseFruitObjects.cs rename to osu.Game.Rulesets.Catch.Tests/TestSceneFruitObjects.cs index a59f4ce150..44517382f7 100644 --- a/osu.Game.Rulesets.Catch.Tests/TestCaseFruitObjects.cs +++ b/osu.Game.Rulesets.Catch.Tests/TestSceneFruitObjects.cs @@ -15,7 +15,7 @@ using osuTK; namespace osu.Game.Rulesets.Catch.Tests { [TestFixture] - public class TestCaseFruitObjects : OsuTestCase + public class TestSceneFruitObjects : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -29,7 +29,7 @@ namespace osu.Game.Rulesets.Catch.Tests typeof(Pulp), }; - public TestCaseFruitObjects() + public TestSceneFruitObjects() { Add(new GridContainer { diff --git a/osu.Game.Rulesets.Catch.Tests/TestCaseHyperDash.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneHyperDash.cs similarity index 94% rename from osu.Game.Rulesets.Catch.Tests/TestCaseHyperDash.cs rename to osu.Game.Rulesets.Catch.Tests/TestSceneHyperDash.cs index a7e7f0ab14..7393f75e5a 100644 --- a/osu.Game.Rulesets.Catch.Tests/TestCaseHyperDash.cs +++ b/osu.Game.Rulesets.Catch.Tests/TestSceneHyperDash.cs @@ -10,9 +10,9 @@ using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Catch.Tests { [TestFixture] - public class TestCaseHyperDash : PlayerTestCase + public class TestSceneHyperDash : PlayerTestScene { - public TestCaseHyperDash() + public TestSceneHyperDash() : base(new CatchRuleset()) { } diff --git a/osu.Game.Rulesets.Catch/Difficulty/CatchDifficultyCalculator.cs b/osu.Game.Rulesets.Catch/Difficulty/CatchDifficultyCalculator.cs index bd647fd667..d6a1ed632b 100644 --- a/osu.Game.Rulesets.Catch/Difficulty/CatchDifficultyCalculator.cs +++ b/osu.Game.Rulesets.Catch/Difficulty/CatchDifficultyCalculator.cs @@ -57,33 +57,20 @@ namespace osu.Game.Rulesets.Catch.Difficulty CatchHitObject lastObject = null; - foreach (var hitObject in beatmap.HitObjects.OfType()) + // In 2B beatmaps, it is possible that a normal Fruit is placed in the middle of a JuiceStream. + foreach (var hitObject in beatmap.HitObjects + .SelectMany(obj => obj is JuiceStream stream ? stream.NestedHitObjects : new[] { obj }) + .Cast() + .OrderBy(x => x.StartTime)) { - if (lastObject == null) - { - lastObject = hitObject; + // We want to only consider fruits that contribute to the combo. + if (hitObject is BananaShower || hitObject is TinyDroplet) continue; - } - switch (hitObject) - { - // We want to only consider fruits that contribute to the combo. Droplets are addressed as accuracy and spinners are not relevant for "skill" calculations. - case Fruit fruit: - yield return new CatchDifficultyHitObject(fruit, lastObject, clockRate, halfCatchWidth); + if (lastObject != null) + yield return new CatchDifficultyHitObject(hitObject, lastObject, clockRate, halfCatchWidth); - lastObject = hitObject; - break; - - case JuiceStream _: - foreach (var nested in hitObject.NestedHitObjects.OfType().Where(o => !(o is TinyDroplet))) - { - yield return new CatchDifficultyHitObject(nested, lastObject, clockRate, halfCatchWidth); - - lastObject = nested; - } - - break; - } + lastObject = hitObject; } } diff --git a/osu.Game.Rulesets.Mania.Tests/ManiaInputTestCase.cs b/osu.Game.Rulesets.Mania.Tests/ManiaInputTestScene.cs similarity index 93% rename from osu.Game.Rulesets.Mania.Tests/ManiaInputTestCase.cs rename to osu.Game.Rulesets.Mania.Tests/ManiaInputTestScene.cs index f281883e0c..909d0d45c6 100644 --- a/osu.Game.Rulesets.Mania.Tests/ManiaInputTestCase.cs +++ b/osu.Game.Rulesets.Mania.Tests/ManiaInputTestScene.cs @@ -8,12 +8,12 @@ using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Mania.Tests { - public abstract class ManiaInputTestCase : OsuTestCase + public abstract class ManiaInputTestScene : OsuTestScene { private readonly Container content; protected override Container Content => content ?? base.Content; - protected ManiaInputTestCase(int keys) + protected ManiaInputTestScene(int keys) { base.Content.Add(content = new LocalInputManager(keys)); } diff --git a/osu.Game.Rulesets.Mania.Tests/ManiaPlacementBlueprintTestCase.cs b/osu.Game.Rulesets.Mania.Tests/ManiaPlacementBlueprintTestScene.cs similarity index 92% rename from osu.Game.Rulesets.Mania.Tests/ManiaPlacementBlueprintTestCase.cs rename to osu.Game.Rulesets.Mania.Tests/ManiaPlacementBlueprintTestScene.cs index 9ad22498a9..4b3786c30a 100644 --- a/osu.Game.Rulesets.Mania.Tests/ManiaPlacementBlueprintTestCase.cs +++ b/osu.Game.Rulesets.Mania.Tests/ManiaPlacementBlueprintTestScene.cs @@ -20,14 +20,14 @@ using osuTK.Graphics; namespace osu.Game.Rulesets.Mania.Tests { [Cached(Type = typeof(IManiaHitObjectComposer))] - public abstract class ManiaPlacementBlueprintTestCase : PlacementBlueprintTestCase, IManiaHitObjectComposer + public abstract class ManiaPlacementBlueprintTestScene : PlacementBlueprintTestScene, IManiaHitObjectComposer { private readonly Column column; [Cached(typeof(IReadOnlyList))] private IReadOnlyList mods { get; set; } = Array.Empty(); - protected ManiaPlacementBlueprintTestCase() + protected ManiaPlacementBlueprintTestScene() { Add(column = new Column(0) { diff --git a/osu.Game.Rulesets.Mania.Tests/ManiaSelectionBlueprintTestCase.cs b/osu.Game.Rulesets.Mania.Tests/ManiaSelectionBlueprintTestScene.cs similarity index 86% rename from osu.Game.Rulesets.Mania.Tests/ManiaSelectionBlueprintTestCase.cs rename to osu.Game.Rulesets.Mania.Tests/ManiaSelectionBlueprintTestScene.cs index a22e599681..b598893e8c 100644 --- a/osu.Game.Rulesets.Mania.Tests/ManiaSelectionBlueprintTestCase.cs +++ b/osu.Game.Rulesets.Mania.Tests/ManiaSelectionBlueprintTestScene.cs @@ -13,14 +13,14 @@ using osuTK.Graphics; namespace osu.Game.Rulesets.Mania.Tests { [Cached(Type = typeof(IManiaHitObjectComposer))] - public abstract class ManiaSelectionBlueprintTestCase : SelectionBlueprintTestCase, IManiaHitObjectComposer + public abstract class ManiaSelectionBlueprintTestScene : SelectionBlueprintTestScene, IManiaHitObjectComposer { [Cached(Type = typeof(IAdjustableClock))] private readonly IAdjustableClock clock = new StopwatchClock(); private readonly Column column; - protected ManiaSelectionBlueprintTestCase() + protected ManiaSelectionBlueprintTestScene() { Add(column = new Column(0) { diff --git a/osu.Game.Rulesets.Mania.Tests/TestCaseAutoGeneration.cs b/osu.Game.Rulesets.Mania.Tests/TestSceneAutoGeneration.cs similarity index 99% rename from osu.Game.Rulesets.Mania.Tests/TestCaseAutoGeneration.cs rename to osu.Game.Rulesets.Mania.Tests/TestSceneAutoGeneration.cs index e8a056bbff..20ac5eaa39 100644 --- a/osu.Game.Rulesets.Mania.Tests/TestCaseAutoGeneration.cs +++ b/osu.Game.Rulesets.Mania.Tests/TestSceneAutoGeneration.cs @@ -12,7 +12,7 @@ using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Mania.Tests { [TestFixture] - public class TestCaseAutoGeneration : OsuTestCase + public class TestSceneAutoGeneration : OsuTestScene { [Test] public void TestSingleNote() diff --git a/osu.Game.Rulesets.Mania.Tests/TestCaseColumn.cs b/osu.Game.Rulesets.Mania.Tests/TestSceneColumn.cs similarity index 97% rename from osu.Game.Rulesets.Mania.Tests/TestCaseColumn.cs rename to osu.Game.Rulesets.Mania.Tests/TestSceneColumn.cs index d46b661eea..d94a986dae 100644 --- a/osu.Game.Rulesets.Mania.Tests/TestCaseColumn.cs +++ b/osu.Game.Rulesets.Mania.Tests/TestSceneColumn.cs @@ -22,7 +22,7 @@ using osuTK.Graphics; namespace osu.Game.Rulesets.Mania.Tests { [TestFixture] - public class TestCaseColumn : ManiaInputTestCase + public class TestSceneColumn : ManiaInputTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -37,7 +37,7 @@ namespace osu.Game.Rulesets.Mania.Tests private readonly List columns = new List(); - public TestCaseColumn() + public TestSceneColumn() : base(2) { } diff --git a/osu.Game.Rulesets.Mania.Tests/TestCaseEditor.cs b/osu.Game.Rulesets.Mania.Tests/TestSceneEditor.cs similarity index 92% rename from osu.Game.Rulesets.Mania.Tests/TestCaseEditor.cs rename to osu.Game.Rulesets.Mania.Tests/TestSceneEditor.cs index e721eb6fd9..7ed886be49 100644 --- a/osu.Game.Rulesets.Mania.Tests/TestCaseEditor.cs +++ b/osu.Game.Rulesets.Mania.Tests/TestSceneEditor.cs @@ -11,11 +11,11 @@ using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Mania.Tests { [TestFixture] - public class TestCaseEditor : EditorTestCase + public class TestSceneEditor : EditorTestScene { private readonly Bindable direction = new Bindable(); - public TestCaseEditor() + public TestSceneEditor() : base(new ManiaRuleset()) { AddStep("upwards scroll", () => direction.Value = ManiaScrollingDirection.Up); diff --git a/osu.Game.Rulesets.Mania.Tests/TestCaseHoldNotePlacementBlueprint.cs b/osu.Game.Rulesets.Mania.Tests/TestSceneHoldNotePlacementBlueprint.cs similarity index 88% rename from osu.Game.Rulesets.Mania.Tests/TestCaseHoldNotePlacementBlueprint.cs rename to osu.Game.Rulesets.Mania.Tests/TestSceneHoldNotePlacementBlueprint.cs index 411412e127..b4332264b9 100644 --- a/osu.Game.Rulesets.Mania.Tests/TestCaseHoldNotePlacementBlueprint.cs +++ b/osu.Game.Rulesets.Mania.Tests/TestSceneHoldNotePlacementBlueprint.cs @@ -10,7 +10,7 @@ using osu.Game.Rulesets.Objects.Drawables; namespace osu.Game.Rulesets.Mania.Tests { - public class TestCaseHoldNotePlacementBlueprint : ManiaPlacementBlueprintTestCase + public class TestSceneHoldNotePlacementBlueprint : ManiaPlacementBlueprintTestScene { protected override DrawableHitObject CreateHitObject(HitObject hitObject) => new DrawableHoldNote((HoldNote)hitObject); protected override PlacementBlueprint CreateBlueprint() => new HoldNotePlacementBlueprint(); diff --git a/osu.Game.Rulesets.Mania.Tests/TestCaseHoldNoteSelectionBlueprint.cs b/osu.Game.Rulesets.Mania.Tests/TestSceneHoldNoteSelectionBlueprint.cs similarity index 93% rename from osu.Game.Rulesets.Mania.Tests/TestCaseHoldNoteSelectionBlueprint.cs rename to osu.Game.Rulesets.Mania.Tests/TestSceneHoldNoteSelectionBlueprint.cs index ae614ae4b8..04c5724f93 100644 --- a/osu.Game.Rulesets.Mania.Tests/TestCaseHoldNoteSelectionBlueprint.cs +++ b/osu.Game.Rulesets.Mania.Tests/TestSceneHoldNoteSelectionBlueprint.cs @@ -15,14 +15,14 @@ using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Mania.Tests { - public class TestCaseHoldNoteSelectionBlueprint : ManiaSelectionBlueprintTestCase + public class TestSceneHoldNoteSelectionBlueprint : ManiaSelectionBlueprintTestScene { private readonly DrawableHoldNote drawableObject; protected override Container Content => content ?? base.Content; private readonly Container content; - public TestCaseHoldNoteSelectionBlueprint() + public TestSceneHoldNoteSelectionBlueprint() { var holdNote = new HoldNote { Column = 0, Duration = 1000 }; holdNote.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty()); diff --git a/osu.Game.Rulesets.Mania.Tests/TestCaseNotePlacementBlueprint.cs b/osu.Game.Rulesets.Mania.Tests/TestSceneNotePlacementBlueprint.cs similarity index 88% rename from osu.Game.Rulesets.Mania.Tests/TestCaseNotePlacementBlueprint.cs rename to osu.Game.Rulesets.Mania.Tests/TestSceneNotePlacementBlueprint.cs index 12cbeb81f3..d7b539a2a0 100644 --- a/osu.Game.Rulesets.Mania.Tests/TestCaseNotePlacementBlueprint.cs +++ b/osu.Game.Rulesets.Mania.Tests/TestSceneNotePlacementBlueprint.cs @@ -10,7 +10,7 @@ using osu.Game.Rulesets.Objects.Drawables; namespace osu.Game.Rulesets.Mania.Tests { - public class TestCaseNotePlacementBlueprint : ManiaPlacementBlueprintTestCase + public class TestSceneNotePlacementBlueprint : ManiaPlacementBlueprintTestScene { protected override DrawableHitObject CreateHitObject(HitObject hitObject) => new DrawableNote((Note)hitObject); protected override PlacementBlueprint CreateBlueprint() => new NotePlacementBlueprint(); diff --git a/osu.Game.Rulesets.Mania.Tests/TestCaseNoteSelectionBlueprint.cs b/osu.Game.Rulesets.Mania.Tests/TestSceneNoteSelectionBlueprint.cs similarity index 90% rename from osu.Game.Rulesets.Mania.Tests/TestCaseNoteSelectionBlueprint.cs rename to osu.Game.Rulesets.Mania.Tests/TestSceneNoteSelectionBlueprint.cs index 99fe464cfd..6bb344f977 100644 --- a/osu.Game.Rulesets.Mania.Tests/TestCaseNoteSelectionBlueprint.cs +++ b/osu.Game.Rulesets.Mania.Tests/TestSceneNoteSelectionBlueprint.cs @@ -15,14 +15,14 @@ using osuTK; namespace osu.Game.Rulesets.Mania.Tests { - public class TestCaseNoteSelectionBlueprint : ManiaSelectionBlueprintTestCase + public class TestSceneNoteSelectionBlueprint : ManiaSelectionBlueprintTestScene { private readonly DrawableNote drawableObject; protected override Container Content => content ?? base.Content; private readonly Container content; - public TestCaseNoteSelectionBlueprint() + public TestSceneNoteSelectionBlueprint() { var note = new Note { Column = 0 }; note.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty()); diff --git a/osu.Game.Rulesets.Mania.Tests/TestCaseNotes.cs b/osu.Game.Rulesets.Mania.Tests/TestSceneNotes.cs similarity index 99% rename from osu.Game.Rulesets.Mania.Tests/TestCaseNotes.cs rename to osu.Game.Rulesets.Mania.Tests/TestSceneNotes.cs index 2220873d89..0d143198dd 100644 --- a/osu.Game.Rulesets.Mania.Tests/TestCaseNotes.cs +++ b/osu.Game.Rulesets.Mania.Tests/TestSceneNotes.cs @@ -27,7 +27,7 @@ using osuTK.Graphics; namespace osu.Game.Rulesets.Mania.Tests { [TestFixture] - public class TestCaseNotes : OsuTestCase + public class TestSceneNotes : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { diff --git a/osu.Game.Rulesets.Mania.Tests/TestCaseStage.cs b/osu.Game.Rulesets.Mania.Tests/TestSceneStage.cs similarity index 98% rename from osu.Game.Rulesets.Mania.Tests/TestCaseStage.cs rename to osu.Game.Rulesets.Mania.Tests/TestSceneStage.cs index 9a7a3d1c5c..395e6daf0a 100644 --- a/osu.Game.Rulesets.Mania.Tests/TestCaseStage.cs +++ b/osu.Game.Rulesets.Mania.Tests/TestSceneStage.cs @@ -22,7 +22,7 @@ using osuTK; namespace osu.Game.Rulesets.Mania.Tests { [TestFixture] - public class TestCaseStage : ManiaInputTestCase + public class TestSceneStage : ManiaInputTestScene { private const int columns = 4; @@ -33,7 +33,7 @@ namespace osu.Game.Rulesets.Mania.Tests private FillFlowContainer fill; - public TestCaseStage() + public TestSceneStage() : base(columns) { } diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseEditor.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneEditor.cs similarity index 79% rename from osu.Game.Rulesets.Osu.Tests/TestCaseEditor.cs rename to osu.Game.Rulesets.Osu.Tests/TestSceneEditor.cs index 83626e7043..4aca34bf64 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseEditor.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneEditor.cs @@ -7,9 +7,9 @@ using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Osu.Tests { [TestFixture] - public class TestCaseEditor : EditorTestCase + public class TestSceneEditor : EditorTestScene { - public TestCaseEditor() + public TestSceneEditor() : base(new OsuRuleset()) { } diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseGameplayCursor.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneGameplayCursor.cs similarity index 93% rename from osu.Game.Rulesets.Osu.Tests/TestCaseGameplayCursor.cs rename to osu.Game.Rulesets.Osu.Tests/TestSceneGameplayCursor.cs index 1e2a936002..1b1cfa89c0 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseGameplayCursor.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneGameplayCursor.cs @@ -15,7 +15,7 @@ using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Osu.Tests { [TestFixture] - public class TestCaseGameplayCursor : OsuTestCase, IProvideCursor + public class TestSceneGameplayCursor : OsuTestScene, IProvideCursor { private GameplayCursorContainer cursorContainer; diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseHitCircle.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneHitCircle.cs similarity index 97% rename from osu.Game.Rulesets.Osu.Tests/TestCaseHitCircle.cs rename to osu.Game.Rulesets.Osu.Tests/TestSceneHitCircle.cs index 31f3146046..d44a0cd841 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseHitCircle.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneHitCircle.cs @@ -19,7 +19,7 @@ using osu.Game.Rulesets.Scoring; namespace osu.Game.Rulesets.Osu.Tests { [TestFixture] - public class TestCaseHitCircle : OsuTestCase + public class TestSceneHitCircle : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -31,7 +31,7 @@ namespace osu.Game.Rulesets.Osu.Tests private int depthIndex; - public TestCaseHitCircle() + public TestSceneHitCircle() { base.Content.Add(content = new OsuInputManager(new RulesetInfo { ID = 0 })); diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseHitCircleHidden.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneHitCircleHidden.cs similarity index 84% rename from osu.Game.Rulesets.Osu.Tests/TestCaseHitCircleHidden.cs rename to osu.Game.Rulesets.Osu.Tests/TestSceneHitCircleHidden.cs index 7391c0f11a..55c6b22146 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseHitCircleHidden.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneHitCircleHidden.cs @@ -10,11 +10,11 @@ using osu.Game.Rulesets.Osu.Mods; namespace osu.Game.Rulesets.Osu.Tests { [TestFixture] - public class TestCaseHitCircleHidden : TestCaseHitCircle + public class TestSceneHitCircleHidden : TestSceneHitCircle { public override IReadOnlyList RequiredTypes => base.RequiredTypes.Concat(new[] { typeof(OsuModHidden) }).ToList(); - public TestCaseHitCircleHidden() + public TestSceneHitCircleHidden() { Mods.Value = new[] { new OsuModHidden() }; } diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseHitCircleLongCombo.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneHitCircleLongCombo.cs similarity index 89% rename from osu.Game.Rulesets.Osu.Tests/TestCaseHitCircleLongCombo.cs rename to osu.Game.Rulesets.Osu.Tests/TestSceneHitCircleLongCombo.cs index 8d097ff1c1..921246751c 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseHitCircleLongCombo.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneHitCircleLongCombo.cs @@ -10,9 +10,9 @@ using osuTK; namespace osu.Game.Rulesets.Osu.Tests { [TestFixture] - public class TestCaseHitCircleLongCombo : PlayerTestCase + public class TestSceneHitCircleLongCombo : PlayerTestScene { - public TestCaseHitCircleLongCombo() + public TestSceneHitCircleLongCombo() : base(new OsuRuleset()) { } diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseHitCirclePlacementBlueprint.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneHitCirclePlacementBlueprint.cs similarity index 89% rename from osu.Game.Rulesets.Osu.Tests/TestCaseHitCirclePlacementBlueprint.cs rename to osu.Game.Rulesets.Osu.Tests/TestSceneHitCirclePlacementBlueprint.cs index d536e39eef..4c6abc45f7 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseHitCirclePlacementBlueprint.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneHitCirclePlacementBlueprint.cs @@ -11,7 +11,7 @@ using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Osu.Tests { - public class TestCaseHitCirclePlacementBlueprint : PlacementBlueprintTestCase + public class TestSceneHitCirclePlacementBlueprint : PlacementBlueprintTestScene { protected override DrawableHitObject CreateHitObject(HitObject hitObject) => new DrawableHitCircle((HitCircle)hitObject); protected override PlacementBlueprint CreateBlueprint() => new HitCirclePlacementBlueprint(); diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseHitCircleSelectionBlueprint.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneHitCircleSelectionBlueprint.cs similarity index 87% rename from osu.Game.Rulesets.Osu.Tests/TestCaseHitCircleSelectionBlueprint.cs rename to osu.Game.Rulesets.Osu.Tests/TestSceneHitCircleSelectionBlueprint.cs index e9284e453e..32043bf5d7 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseHitCircleSelectionBlueprint.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneHitCircleSelectionBlueprint.cs @@ -12,11 +12,11 @@ using osuTK; namespace osu.Game.Rulesets.Osu.Tests { - public class TestCaseHitCircleSelectionBlueprint : SelectionBlueprintTestCase + public class TestSceneHitCircleSelectionBlueprint : SelectionBlueprintTestScene { private readonly DrawableHitCircle drawableObject; - public TestCaseHitCircleSelectionBlueprint() + public TestSceneHitCircleSelectionBlueprint() { var hitCircle = new HitCircle { Position = new Vector2(256, 192) }; hitCircle.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty { CircleSize = 2 }); diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseOsuFlashlight.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneOsuFlashlight.cs similarity index 89% rename from osu.Game.Rulesets.Osu.Tests/TestCaseOsuFlashlight.cs rename to osu.Game.Rulesets.Osu.Tests/TestSceneOsuFlashlight.cs index 1e72591b87..64e7632b1b 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseOsuFlashlight.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneOsuFlashlight.cs @@ -7,7 +7,7 @@ using osu.Game.Screens.Play; namespace osu.Game.Rulesets.Osu.Tests { - public class TestCaseOsuFlashlight : TestCaseOsuPlayer + public class TestSceneOsuFlashlight : TestSceneOsuPlayer { protected override Player CreatePlayer(Ruleset ruleset) { diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseOsuPlayer.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneOsuPlayer.cs similarity index 78% rename from osu.Game.Rulesets.Osu.Tests/TestCaseOsuPlayer.cs rename to osu.Game.Rulesets.Osu.Tests/TestSceneOsuPlayer.cs index 720c3c66fe..0a33b09ba8 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseOsuPlayer.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneOsuPlayer.cs @@ -7,9 +7,9 @@ using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Osu.Tests { [TestFixture] - public class TestCaseOsuPlayer : PlayerTestCase + public class TestSceneOsuPlayer : PlayerTestScene { - public TestCaseOsuPlayer() + public TestSceneOsuPlayer() : base(new OsuRuleset()) { } diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseResumeOverlay.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneResumeOverlay.cs similarity index 95% rename from osu.Game.Rulesets.Osu.Tests/TestCaseResumeOverlay.cs rename to osu.Game.Rulesets.Osu.Tests/TestSceneResumeOverlay.cs index 5956f12146..12a3a8d27e 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseResumeOverlay.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneResumeOverlay.cs @@ -12,14 +12,14 @@ using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Osu.Tests { - public class TestCaseResumeOverlay : ManualInputManagerTestCase + public class TestSceneResumeOverlay : ManualInputManagerTestScene { public override IReadOnlyList RequiredTypes => new[] { typeof(OsuResumeOverlay), }; - public TestCaseResumeOverlay() + public TestSceneResumeOverlay() { ManualOsuInputManager osuInputManager; CursorContainer cursor; diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseShaking.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneShaking.cs similarity index 92% rename from osu.Game.Rulesets.Osu.Tests/TestCaseShaking.cs rename to osu.Game.Rulesets.Osu.Tests/TestSceneShaking.cs index 5dc0dc1024..3d8afd66f4 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseShaking.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneShaking.cs @@ -7,7 +7,7 @@ using osu.Game.Rulesets.Scoring; namespace osu.Game.Rulesets.Osu.Tests { - public class TestCaseShaking : TestCaseHitCircle + public class TestSceneShaking : TestSceneHitCircle { public override void Add(Drawable drawable) { diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseSlider.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneSlider.cs similarity index 99% rename from osu.Game.Rulesets.Osu.Tests/TestCaseSlider.cs rename to osu.Game.Rulesets.Osu.Tests/TestSceneSlider.cs index 0f02050605..1ba6d107be 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseSlider.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneSlider.cs @@ -27,7 +27,7 @@ using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces; namespace osu.Game.Rulesets.Osu.Tests { [TestFixture] - public class TestCaseSlider : OsuTestCase + public class TestSceneSlider : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -45,7 +45,7 @@ namespace osu.Game.Rulesets.Osu.Tests private int depthIndex; - public TestCaseSlider() + public TestSceneSlider() { base.Content.Add(content = new OsuInputManager(new RulesetInfo { ID = 0 })); diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseSliderHidden.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneSliderHidden.cs similarity index 85% rename from osu.Game.Rulesets.Osu.Tests/TestCaseSliderHidden.cs rename to osu.Game.Rulesets.Osu.Tests/TestSceneSliderHidden.cs index 65a8005407..2a9c1d167b 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseSliderHidden.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneSliderHidden.cs @@ -10,11 +10,11 @@ using osu.Game.Rulesets.Osu.Mods; namespace osu.Game.Rulesets.Osu.Tests { [TestFixture] - public class TestCaseSliderHidden : TestCaseSlider + public class TestSceneSliderHidden : TestSceneSlider { public override IReadOnlyList RequiredTypes => base.RequiredTypes.Concat(new[] { typeof(OsuModHidden) }).ToList(); - public TestCaseSliderHidden() + public TestSceneSliderHidden() { Mods.Value = new[] { new OsuModHidden() }; } diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseSliderInput.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneSliderInput.cs similarity index 99% rename from osu.Game.Rulesets.Osu.Tests/TestCaseSliderInput.cs rename to osu.Game.Rulesets.Osu.Tests/TestSceneSliderInput.cs index 9a32cf42b0..193cfe9c94 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseSliderInput.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneSliderInput.cs @@ -26,7 +26,7 @@ using osuTK; namespace osu.Game.Rulesets.Osu.Tests { - public class TestCaseSliderInput : RateAdjustedBeatmapTestCase + public class TestSceneSliderInput : RateAdjustedBeatmapTestScene { public override IReadOnlyList RequiredTypes => new[] { diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseSliderPlacementBlueprint.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneSliderPlacementBlueprint.cs similarity index 89% rename from osu.Game.Rulesets.Osu.Tests/TestCaseSliderPlacementBlueprint.cs rename to osu.Game.Rulesets.Osu.Tests/TestSceneSliderPlacementBlueprint.cs index f11d98613a..0522260150 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseSliderPlacementBlueprint.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneSliderPlacementBlueprint.cs @@ -11,7 +11,7 @@ using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Osu.Tests { - public class TestCaseSliderPlacementBlueprint : PlacementBlueprintTestCase + public class TestSceneSliderPlacementBlueprint : PlacementBlueprintTestScene { protected override DrawableHitObject CreateHitObject(HitObject hitObject) => new DrawableSlider((Slider)hitObject); protected override PlacementBlueprint CreateBlueprint() => new SliderPlacementBlueprint(); diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseSliderSelectionBlueprint.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneSliderSelectionBlueprint.cs similarity index 92% rename from osu.Game.Rulesets.Osu.Tests/TestCaseSliderSelectionBlueprint.cs rename to osu.Game.Rulesets.Osu.Tests/TestSceneSliderSelectionBlueprint.cs index a7386ba48b..8cf5a2f33e 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseSliderSelectionBlueprint.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneSliderSelectionBlueprint.cs @@ -17,7 +17,7 @@ using osuTK; namespace osu.Game.Rulesets.Osu.Tests { - public class TestCaseSliderSelectionBlueprint : SelectionBlueprintTestCase + public class TestSceneSliderSelectionBlueprint : SelectionBlueprintTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -31,7 +31,7 @@ namespace osu.Game.Rulesets.Osu.Tests private readonly DrawableSlider drawableObject; - public TestCaseSliderSelectionBlueprint() + public TestSceneSliderSelectionBlueprint() { var slider = new Slider { diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseSpinner.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneSpinner.cs similarity index 97% rename from osu.Game.Rulesets.Osu.Tests/TestCaseSpinner.cs rename to osu.Game.Rulesets.Osu.Tests/TestSceneSpinner.cs index ab33d1e518..3ed3f3e981 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseSpinner.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneSpinner.cs @@ -18,7 +18,7 @@ using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Osu.Tests { [TestFixture] - public class TestCaseSpinner : OsuTestCase + public class TestSceneSpinner : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -32,7 +32,7 @@ namespace osu.Game.Rulesets.Osu.Tests private int depthIndex; - public TestCaseSpinner() + public TestSceneSpinner() { base.Content.Add(content = new OsuInputManager(new RulesetInfo { ID = 0 })); diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseSpinnerHidden.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerHidden.cs similarity index 84% rename from osu.Game.Rulesets.Osu.Tests/TestCaseSpinnerHidden.cs rename to osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerHidden.cs index 24e3bcb47b..a0ab1908d6 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseSpinnerHidden.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerHidden.cs @@ -10,11 +10,11 @@ using osu.Game.Rulesets.Osu.Mods; namespace osu.Game.Rulesets.Osu.Tests { [TestFixture] - public class TestCaseSpinnerHidden : TestCaseSpinner + public class TestSceneSpinnerHidden : TestSceneSpinner { public override IReadOnlyList RequiredTypes => base.RequiredTypes.Concat(new[] { typeof(OsuModHidden) }).ToList(); - public TestCaseSpinnerHidden() + public TestSceneSpinnerHidden() { Mods.Value = new[] { new OsuModHidden() }; } diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseSpinnerPlacementBlueprint.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerPlacementBlueprint.cs similarity index 89% rename from osu.Game.Rulesets.Osu.Tests/TestCaseSpinnerPlacementBlueprint.cs rename to osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerPlacementBlueprint.cs index 9001ad3596..d74d072857 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseSpinnerPlacementBlueprint.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerPlacementBlueprint.cs @@ -11,7 +11,7 @@ using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Osu.Tests { - public class TestCaseSpinnerPlacementBlueprint : PlacementBlueprintTestCase + public class TestSceneSpinnerPlacementBlueprint : PlacementBlueprintTestScene { protected override DrawableHitObject CreateHitObject(HitObject hitObject) => new DrawableSpinner((Spinner)hitObject); diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseSpinnerSelectionBlueprint.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerSelectionBlueprint.cs similarity index 92% rename from osu.Game.Rulesets.Osu.Tests/TestCaseSpinnerSelectionBlueprint.cs rename to osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerSelectionBlueprint.cs index 11f5ddf8b5..c5cea76b14 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseSpinnerSelectionBlueprint.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerSelectionBlueprint.cs @@ -17,7 +17,7 @@ using osuTK; namespace osu.Game.Rulesets.Osu.Tests { - public class TestCaseSpinnerSelectionBlueprint : SelectionBlueprintTestCase + public class TestSceneSpinnerSelectionBlueprint : SelectionBlueprintTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -27,7 +27,7 @@ namespace osu.Game.Rulesets.Osu.Tests private readonly DrawableSpinner drawableSpinner; - public TestCaseSpinnerSelectionBlueprint() + public TestSceneSpinnerSelectionBlueprint() { var spinner = new Spinner { diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModFlashlight.cs b/osu.Game.Rulesets.Osu/Mods/OsuModFlashlight.cs index c0332fbf60..7fa3dbe07e 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuModFlashlight.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuModFlashlight.cs @@ -7,6 +7,7 @@ using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Input; using osu.Framework.Input.Events; +using osu.Framework.MathUtils; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Osu.Objects; @@ -48,7 +49,14 @@ namespace osu.Game.Rulesets.Osu.Mods protected override bool OnMouseMove(MouseMoveEvent e) { - FlashlightPosition = e.MousePosition; + const double follow_delay = 120; + + var position = FlashlightPosition; + var destination = e.MousePosition; + + FlashlightPosition = Interpolation.ValueAt( + MathHelper.Clamp(Clock.ElapsedFrameTime, 0, follow_delay), position, destination, 0, follow_delay, Easing.Out); + return base.OnMouseMove(e); } diff --git a/osu.Game.Rulesets.Osu/UI/DrawableOsuRuleset.cs b/osu.Game.Rulesets.Osu/UI/DrawableOsuRuleset.cs index 17fffbd974..d185d7d4c9 100644 --- a/osu.Game.Rulesets.Osu/UI/DrawableOsuRuleset.cs +++ b/osu.Game.Rulesets.Osu/UI/DrawableOsuRuleset.cs @@ -63,8 +63,10 @@ namespace osu.Game.Rulesets.Osu.UI { get { - var first = (OsuHitObject)Objects.First(); - return first.StartTime - Math.Max(2000, first.TimePreempt); + if (Objects.FirstOrDefault() is OsuHitObject first) + return first.StartTime - Math.Max(2000, first.TimePreempt); + + return 0; } } } diff --git a/osu.Game.Rulesets.Taiko.Tests/TestCaseInputDrum.cs b/osu.Game.Rulesets.Taiko.Tests/TestSceneInputDrum.cs similarity index 93% rename from osu.Game.Rulesets.Taiko.Tests/TestCaseInputDrum.cs rename to osu.Game.Rulesets.Taiko.Tests/TestSceneInputDrum.cs index 136d9067d5..02300a5dde 100644 --- a/osu.Game.Rulesets.Taiko.Tests/TestCaseInputDrum.cs +++ b/osu.Game.Rulesets.Taiko.Tests/TestSceneInputDrum.cs @@ -16,7 +16,7 @@ using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Taiko.Tests { [TestFixture] - public class TestCaseInputDrum : OsuTestCase + public class TestSceneInputDrum : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Taiko.Tests typeof(SampleControlPoint) }; - public TestCaseInputDrum() + public TestSceneInputDrum() { Add(new TaikoInputManager(new RulesetInfo { ID = 1 }) { diff --git a/osu.Game.Rulesets.Taiko.Tests/TestCaseTaikoPlayfield.cs b/osu.Game.Rulesets.Taiko.Tests/TestSceneTaikoPlayfield.cs similarity index 99% rename from osu.Game.Rulesets.Taiko.Tests/TestCaseTaikoPlayfield.cs rename to osu.Game.Rulesets.Taiko.Tests/TestSceneTaikoPlayfield.cs index 8cd5918fc5..3634ec7d4a 100644 --- a/osu.Game.Rulesets.Taiko.Tests/TestCaseTaikoPlayfield.cs +++ b/osu.Game.Rulesets.Taiko.Tests/TestSceneTaikoPlayfield.cs @@ -26,7 +26,7 @@ using osu.Game.Rulesets.Scoring; namespace osu.Game.Rulesets.Taiko.Tests { [TestFixture] - public class TestCaseTaikoPlayfield : OsuTestCase + public class TestSceneTaikoPlayfield : OsuTestScene { private const double default_duration = 1000; private const float scroll_time = 1000; diff --git a/osu.Game.Tests/Beatmaps/Formats/LegacyDecoderTest.cs b/osu.Game.Tests/Beatmaps/Formats/LegacyDecoderTest.cs new file mode 100644 index 0000000000..b4d219456c --- /dev/null +++ b/osu.Game.Tests/Beatmaps/Formats/LegacyDecoderTest.cs @@ -0,0 +1,56 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using System.Collections.Generic; +using System.IO; +using NUnit.Framework; +using osu.Game.Beatmaps.Formats; +using osu.Game.Tests.Resources; + +namespace osu.Game.Tests.Beatmaps.Formats +{ + [TestFixture] + public class LegacyDecoderTest + { + [Test] + public void TestDecodeComments() + { + var decoder = new LineLoggingDecoder(14); + + using (var resStream = TestResources.OpenResource("comments.osu")) + using (var stream = new StreamReader(resStream)) + { + decoder.Decode(stream); + + Assert.That(decoder.ParsedLines, Has.None.EqualTo("// Combo1: 0, 0, 0")); + Assert.That(decoder.ParsedLines, Has.None.EqualTo("//Combo2: 0, 0, 0")); + Assert.That(decoder.ParsedLines, Has.None.EqualTo(" // Combo3: 0, 0, 0")); + Assert.That(decoder.ParsedLines, Has.One.EqualTo("Combo1: 100, 100, 100 // Comment at end of line")); + } + } + + private class LineLoggingDecoder : LegacyDecoder + { + public readonly List ParsedLines = new List(); + + public LineLoggingDecoder(int version) + : base(version) + { + } + + protected override bool ShouldSkipLine(string line) + { + var result = base.ShouldSkipLine(line); + + if (!result) + ParsedLines.Add(line); + + return result; + } + } + + private class TestModel + { + } + } +} diff --git a/osu.Game.Tests/Chat/MessageFormatterTests.cs b/osu.Game.Tests/Chat/MessageFormatterTests.cs index 720d93cb10..0d6ed67767 100644 --- a/osu.Game.Tests/Chat/MessageFormatterTests.cs +++ b/osu.Game.Tests/Chat/MessageFormatterTests.cs @@ -65,7 +65,7 @@ namespace osu.Game.Tests.Chat } [Test] - public void TestCaseInsensitiveLinks() + public void TestInsensitiveLinks() { Message result = MessageFormatter.FormatMessage(new Message { Content = "look: http://puu.sh/7Ggh8xcC6/asf0asd9876.NEF" }); diff --git a/osu.Game.Tests/Resources/comments.osu b/osu.Game.Tests/Resources/comments.osu new file mode 100644 index 0000000000..78b48dd804 --- /dev/null +++ b/osu.Game.Tests/Resources/comments.osu @@ -0,0 +1,9 @@ +osu file format v14 + +[Colours] + +// Combo1: 0, 0, 0 +//Combo2: 0, 0, 0 + // Combo3: 0, 0, 0 + +Combo1: 100, 100, 100 // Comment at end of line \ No newline at end of file diff --git a/osu.Game.Tests/Visual/Background/TestCaseBackgroundScreenBeatmap.cs b/osu.Game.Tests/Visual/Background/TestSceneBackgroundScreenBeatmap.cs similarity index 99% rename from osu.Game.Tests/Visual/Background/TestCaseBackgroundScreenBeatmap.cs rename to osu.Game.Tests/Visual/Background/TestSceneBackgroundScreenBeatmap.cs index 55e8a810fd..10e3dc10c8 100644 --- a/osu.Game.Tests/Visual/Background/TestCaseBackgroundScreenBeatmap.cs +++ b/osu.Game.Tests/Visual/Background/TestSceneBackgroundScreenBeatmap.cs @@ -35,7 +35,7 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.Background { [TestFixture] - public class TestCaseBackgroundScreenBeatmap : ManualInputManagerTestCase + public class TestSceneBackgroundScreenBeatmap : ManualInputManagerTestScene { public override IReadOnlyList RequiredTypes => new[] { diff --git a/osu.Game.Tests/Visual/Components/TestCaseIdleTracker.cs b/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs similarity index 97% rename from osu.Game.Tests/Visual/Components/TestCaseIdleTracker.cs rename to osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs index bf59c116bb..e97983dd8b 100644 --- a/osu.Game.Tests/Visual/Components/TestCaseIdleTracker.cs +++ b/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs @@ -12,14 +12,14 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.Components { [TestFixture] - public class TestCaseIdleTracker : ManualInputManagerTestCase + public class TestSceneIdleTracker : ManualInputManagerTestScene { private readonly IdleTrackingBox box1; private readonly IdleTrackingBox box2; private readonly IdleTrackingBox box3; private readonly IdleTrackingBox box4; - public TestCaseIdleTracker() + public TestSceneIdleTracker() { Children = new Drawable[] { diff --git a/osu.Game.Tests/Visual/Components/TestCasePollingComponent.cs b/osu.Game.Tests/Visual/Components/TestScenePollingComponent.cs similarity index 98% rename from osu.Game.Tests/Visual/Components/TestCasePollingComponent.cs rename to osu.Game.Tests/Visual/Components/TestScenePollingComponent.cs index 6582145f6e..fb10015ef4 100644 --- a/osu.Game.Tests/Visual/Components/TestCasePollingComponent.cs +++ b/osu.Game.Tests/Visual/Components/TestScenePollingComponent.cs @@ -15,7 +15,7 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.Components { - public class TestCasePollingComponent : OsuTestCase + public class TestScenePollingComponent : OsuTestScene { private Container pollBox; private TestPoller poller; diff --git a/osu.Game.Tests/Visual/Components/TestCasePreviewTrackManager.cs b/osu.Game.Tests/Visual/Components/TestScenePreviewTrackManager.cs similarity index 98% rename from osu.Game.Tests/Visual/Components/TestCasePreviewTrackManager.cs rename to osu.Game.Tests/Visual/Components/TestScenePreviewTrackManager.cs index 4b6ae696fe..94412455a0 100644 --- a/osu.Game.Tests/Visual/Components/TestCasePreviewTrackManager.cs +++ b/osu.Game.Tests/Visual/Components/TestScenePreviewTrackManager.cs @@ -10,7 +10,7 @@ using osu.Game.Beatmaps; namespace osu.Game.Tests.Visual.Components { - public class TestCasePreviewTrackManager : OsuTestCase, IPreviewTrackOwner + public class TestScenePreviewTrackManager : OsuTestScene, IPreviewTrackOwner { private readonly PreviewTrackManager trackManager = new TestPreviewTrackManager(); diff --git a/osu.Game.Tests/Visual/Editor/TestCaseBeatDivisorControl.cs b/osu.Game.Tests/Visual/Editor/TestSceneBeatDivisorControl.cs similarity index 93% rename from osu.Game.Tests/Visual/Editor/TestCaseBeatDivisorControl.cs rename to osu.Game.Tests/Visual/Editor/TestSceneBeatDivisorControl.cs index e822e01110..7531a7be2c 100644 --- a/osu.Game.Tests/Visual/Editor/TestCaseBeatDivisorControl.cs +++ b/osu.Game.Tests/Visual/Editor/TestSceneBeatDivisorControl.cs @@ -11,7 +11,7 @@ using osuTK; namespace osu.Game.Tests.Visual.Editor { - public class TestCaseBeatDivisorControl : OsuTestCase + public class TestSceneBeatDivisorControl : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { typeof(BindableBeatDivisor) }; diff --git a/osu.Game.Tests/Visual/Editor/TestCaseEditorCompose.cs b/osu.Game.Tests/Visual/Editor/TestSceneEditorCompose.cs similarity index 92% rename from osu.Game.Tests/Visual/Editor/TestCaseEditorCompose.cs rename to osu.Game.Tests/Visual/Editor/TestSceneEditorCompose.cs index aa7c7f5cb3..b537cb0beb 100644 --- a/osu.Game.Tests/Visual/Editor/TestCaseEditorCompose.cs +++ b/osu.Game.Tests/Visual/Editor/TestSceneEditorCompose.cs @@ -12,7 +12,7 @@ using osu.Game.Tests.Beatmaps; namespace osu.Game.Tests.Visual.Editor { [TestFixture] - public class TestCaseEditorCompose : EditorClockTestCase + public class TestSceneEditorCompose : EditorClockTestScene { public override IReadOnlyList RequiredTypes => new[] { typeof(ComposeScreen) }; diff --git a/osu.Game.Tests/Visual/Editor/TestCaseEditorComposeRadioButtons.cs b/osu.Game.Tests/Visual/Editor/TestSceneEditorComposeRadioButtons.cs similarity index 92% rename from osu.Game.Tests/Visual/Editor/TestCaseEditorComposeRadioButtons.cs rename to osu.Game.Tests/Visual/Editor/TestSceneEditorComposeRadioButtons.cs index 499db1b69f..1709067d5d 100644 --- a/osu.Game.Tests/Visual/Editor/TestCaseEditorComposeRadioButtons.cs +++ b/osu.Game.Tests/Visual/Editor/TestSceneEditorComposeRadioButtons.cs @@ -10,11 +10,11 @@ using osu.Game.Screens.Edit.Components.RadioButtons; namespace osu.Game.Tests.Visual.Editor { [TestFixture] - public class TestCaseEditorComposeRadioButtons : OsuTestCase + public class TestSceneEditorComposeRadioButtons : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { typeof(DrawableRadioButton) }; - public TestCaseEditorComposeRadioButtons() + public TestSceneEditorComposeRadioButtons() { RadioButtonCollection collection; Add(collection = new RadioButtonCollection diff --git a/osu.Game.Tests/Visual/Editor/TestCaseEditorComposeTimeline.cs b/osu.Game.Tests/Visual/Editor/TestSceneEditorComposeTimeline.cs similarity index 98% rename from osu.Game.Tests/Visual/Editor/TestCaseEditorComposeTimeline.cs rename to osu.Game.Tests/Visual/Editor/TestSceneEditorComposeTimeline.cs index d7712293c3..154c58dd99 100644 --- a/osu.Game.Tests/Visual/Editor/TestCaseEditorComposeTimeline.cs +++ b/osu.Game.Tests/Visual/Editor/TestSceneEditorComposeTimeline.cs @@ -19,7 +19,7 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.Editor { [TestFixture] - public class TestCaseEditorComposeTimeline : EditorClockTestCase + public class TestSceneEditorComposeTimeline : EditorClockTestScene { public override IReadOnlyList RequiredTypes => new[] { diff --git a/osu.Game.Tests/Visual/Editor/TestCaseEditorMenuBar.cs b/osu.Game.Tests/Visual/Editor/TestSceneEditorMenuBar.cs similarity index 98% rename from osu.Game.Tests/Visual/Editor/TestCaseEditorMenuBar.cs rename to osu.Game.Tests/Visual/Editor/TestSceneEditorMenuBar.cs index b012d4b52d..53c2d62067 100644 --- a/osu.Game.Tests/Visual/Editor/TestCaseEditorMenuBar.cs +++ b/osu.Game.Tests/Visual/Editor/TestSceneEditorMenuBar.cs @@ -13,11 +13,11 @@ using osu.Game.Screens.Edit.Components.Menus; namespace osu.Game.Tests.Visual.Editor { [TestFixture] - public class TestCaseEditorMenuBar : OsuTestCase + public class TestSceneEditorMenuBar : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { typeof(EditorMenuBar), typeof(ScreenSelectionTabControl) }; - public TestCaseEditorMenuBar() + public TestSceneEditorMenuBar() { Add(new Container { diff --git a/osu.Game.Tests/Visual/Editor/TestCaseEditorSeekSnapping.cs b/osu.Game.Tests/Visual/Editor/TestSceneEditorSeekSnapping.cs similarity index 99% rename from osu.Game.Tests/Visual/Editor/TestCaseEditorSeekSnapping.cs rename to osu.Game.Tests/Visual/Editor/TestSceneEditorSeekSnapping.cs index 9daba54b58..590fa59107 100644 --- a/osu.Game.Tests/Visual/Editor/TestCaseEditorSeekSnapping.cs +++ b/osu.Game.Tests/Visual/Editor/TestSceneEditorSeekSnapping.cs @@ -17,9 +17,9 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.Editor { [TestFixture] - public class TestCaseEditorSeekSnapping : EditorClockTestCase + public class TestSceneEditorSeekSnapping : EditorClockTestScene { - public TestCaseEditorSeekSnapping() + public TestSceneEditorSeekSnapping() { BeatDivisor.Value = 4; } diff --git a/osu.Game.Tests/Visual/Editor/TestCaseEditorSummaryTimeline.cs b/osu.Game.Tests/Visual/Editor/TestSceneEditorSummaryTimeline.cs similarity index 93% rename from osu.Game.Tests/Visual/Editor/TestCaseEditorSummaryTimeline.cs rename to osu.Game.Tests/Visual/Editor/TestSceneEditorSummaryTimeline.cs index 99d6385804..f20c921ff2 100644 --- a/osu.Game.Tests/Visual/Editor/TestCaseEditorSummaryTimeline.cs +++ b/osu.Game.Tests/Visual/Editor/TestSceneEditorSummaryTimeline.cs @@ -14,7 +14,7 @@ using osuTK; namespace osu.Game.Tests.Visual.Editor { [TestFixture] - public class TestCaseEditorSummaryTimeline : EditorClockTestCase + public class TestSceneEditorSummaryTimeline : EditorClockTestScene { public override IReadOnlyList RequiredTypes => new[] { typeof(SummaryTimeline) }; diff --git a/osu.Game.Tests/Visual/Editor/TestCaseHitObjectComposer.cs b/osu.Game.Tests/Visual/Editor/TestSceneHitObjectComposer.cs similarity index 97% rename from osu.Game.Tests/Visual/Editor/TestCaseHitObjectComposer.cs rename to osu.Game.Tests/Visual/Editor/TestSceneHitObjectComposer.cs index be335fb71f..47aa059b62 100644 --- a/osu.Game.Tests/Visual/Editor/TestCaseHitObjectComposer.cs +++ b/osu.Game.Tests/Visual/Editor/TestSceneHitObjectComposer.cs @@ -25,7 +25,7 @@ namespace osu.Game.Tests.Visual.Editor { [TestFixture] [Cached(Type = typeof(IPlacementHandler))] - public class TestCaseHitObjectComposer : OsuTestCase, IPlacementHandler + public class TestSceneHitObjectComposer : OsuTestScene, IPlacementHandler { public override IReadOnlyList RequiredTypes => new[] { diff --git a/osu.Game.Tests/Visual/Editor/TestCasePlaybackControl.cs b/osu.Game.Tests/Visual/Editor/TestScenePlaybackControl.cs similarity index 94% rename from osu.Game.Tests/Visual/Editor/TestCasePlaybackControl.cs rename to osu.Game.Tests/Visual/Editor/TestScenePlaybackControl.cs index 7d9b43251e..126ab98291 100644 --- a/osu.Game.Tests/Visual/Editor/TestCasePlaybackControl.cs +++ b/osu.Game.Tests/Visual/Editor/TestScenePlaybackControl.cs @@ -13,7 +13,7 @@ using osuTK; namespace osu.Game.Tests.Visual.Editor { [TestFixture] - public class TestCasePlaybackControl : OsuTestCase + public class TestScenePlaybackControl : OsuTestScene { [BackgroundDependencyLoader] private void load() diff --git a/osu.Game.Tests/Visual/Editor/TestCaseWaveContainer.cs b/osu.Game.Tests/Visual/Editor/TestSceneWaveContainer.cs similarity index 96% rename from osu.Game.Tests/Visual/Editor/TestCaseWaveContainer.cs rename to osu.Game.Tests/Visual/Editor/TestSceneWaveContainer.cs index e87304ded6..de19727251 100644 --- a/osu.Game.Tests/Visual/Editor/TestCaseWaveContainer.cs +++ b/osu.Game.Tests/Visual/Editor/TestSceneWaveContainer.cs @@ -15,7 +15,7 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.Editor { [TestFixture] - public class TestCaseWaveContainer : OsuTestCase + public class TestSceneWaveContainer : OsuTestScene { [BackgroundDependencyLoader] private void load(OsuColour colours) diff --git a/osu.Game.Tests/Visual/Editor/TestCaseWaveform.cs b/osu.Game.Tests/Visual/Editor/TestSceneWaveform.cs similarity index 98% rename from osu.Game.Tests/Visual/Editor/TestCaseWaveform.cs rename to osu.Game.Tests/Visual/Editor/TestSceneWaveform.cs index ce6ca08a61..e93789b1d3 100644 --- a/osu.Game.Tests/Visual/Editor/TestCaseWaveform.cs +++ b/osu.Game.Tests/Visual/Editor/TestSceneWaveform.cs @@ -15,7 +15,7 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.Editor { [TestFixture] - public class TestCaseWaveform : OsuTestCase + public class TestSceneWaveform : OsuTestScene { private WorkingBeatmap waveformBeatmap; diff --git a/osu.Game.Tests/Visual/Editor/TestCaseZoomableScrollContainer.cs b/osu.Game.Tests/Visual/Editor/TestSceneZoomableScrollContainer.cs similarity index 98% rename from osu.Game.Tests/Visual/Editor/TestCaseZoomableScrollContainer.cs rename to osu.Game.Tests/Visual/Editor/TestSceneZoomableScrollContainer.cs index 55c978ae06..da8702209c 100644 --- a/osu.Game.Tests/Visual/Editor/TestCaseZoomableScrollContainer.cs +++ b/osu.Game.Tests/Visual/Editor/TestSceneZoomableScrollContainer.cs @@ -17,7 +17,7 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.Editor { - public class TestCaseZoomableScrollContainer : ManualInputManagerTestCase + public class TestSceneZoomableScrollContainer : ManualInputManagerTestScene { private ZoomableScrollContainer scrollContainer; private Drawable innerBox; diff --git a/osu.Game.Tests/Visual/Gameplay/TestCaseAutoplay.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneAutoplay.cs similarity index 95% rename from osu.Game.Tests/Visual/Gameplay/TestCaseAutoplay.cs rename to osu.Game.Tests/Visual/Gameplay/TestSceneAutoplay.cs index e5dc092c73..452ac859de 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestCaseAutoplay.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneAutoplay.cs @@ -10,7 +10,7 @@ using osu.Game.Screens.Play; namespace osu.Game.Tests.Visual.Gameplay { [Description("Player instantiated with an autoplay mod.")] - public class TestCaseAutoplay : AllPlayersTestCase + public class TestSceneAutoplay : AllPlayersTestScene { protected override Player CreatePlayer(Ruleset ruleset) { diff --git a/osu.Game.Tests/Visual/Gameplay/TestCaseBreakOverlay.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneBreakOverlay.cs similarity index 96% rename from osu.Game.Tests/Visual/Gameplay/TestCaseBreakOverlay.cs rename to osu.Game.Tests/Visual/Gameplay/TestSceneBreakOverlay.cs index dda8005f70..3cd1b8307a 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestCaseBreakOverlay.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneBreakOverlay.cs @@ -9,11 +9,11 @@ using osu.Game.Screens.Play; namespace osu.Game.Tests.Visual.Gameplay { [TestFixture] - public class TestCaseBreakOverlay : OsuTestCase + public class TestSceneBreakOverlay : OsuTestScene { private readonly BreakOverlay breakOverlay; - public TestCaseBreakOverlay() + public TestSceneBreakOverlay() { Child = breakOverlay = new BreakOverlay(true); diff --git a/osu.Game.Tests/Visual/Gameplay/TestCaseFrameStabilityContainer.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneFrameStabilityContainer.cs similarity index 97% rename from osu.Game.Tests/Visual/Gameplay/TestCaseFrameStabilityContainer.cs rename to osu.Game.Tests/Visual/Gameplay/TestSceneFrameStabilityContainer.cs index 7d6430a2cc..5eb71e92c2 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestCaseFrameStabilityContainer.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneFrameStabilityContainer.cs @@ -10,7 +10,7 @@ using osu.Game.Rulesets.UI; namespace osu.Game.Tests.Visual.Gameplay { - public class TestCaseFrameStabilityContainer : OsuTestCase + public class TestSceneFrameStabilityContainer : OsuTestScene { private readonly ManualClock manualClock; @@ -18,7 +18,7 @@ namespace osu.Game.Tests.Visual.Gameplay private ClockConsumingChild consumer; - public TestCaseFrameStabilityContainer() + public TestSceneFrameStabilityContainer() { Child = mainContainer = new Container { diff --git a/osu.Game.Tests/Visual/Gameplay/TestCaseGameplayMenuOverlay.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneGameplayMenuOverlay.cs similarity index 99% rename from osu.Game.Tests/Visual/Gameplay/TestCaseGameplayMenuOverlay.cs rename to osu.Game.Tests/Visual/Gameplay/TestSceneGameplayMenuOverlay.cs index 8e43bf6d3a..ba9c583b08 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestCaseGameplayMenuOverlay.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneGameplayMenuOverlay.cs @@ -17,7 +17,7 @@ using osuTK.Input; namespace osu.Game.Tests.Visual.Gameplay { [Description("player pause/fail screens")] - public class TestCaseGameplayMenuOverlay : ManualInputManagerTestCase + public class TestSceneGameplayMenuOverlay : ManualInputManagerTestScene { public override IReadOnlyList RequiredTypes => new[] { typeof(FailOverlay), typeof(PauseOverlay) }; diff --git a/osu.Game.Tests/Visual/Gameplay/TestCaseHoldForMenuButton.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneHoldForMenuButton.cs similarity index 96% rename from osu.Game.Tests/Visual/Gameplay/TestCaseHoldForMenuButton.cs rename to osu.Game.Tests/Visual/Gameplay/TestSceneHoldForMenuButton.cs index 14e9c7cdb6..d42b61ea55 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestCaseHoldForMenuButton.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneHoldForMenuButton.cs @@ -13,7 +13,7 @@ using osuTK.Input; namespace osu.Game.Tests.Visual.Gameplay { [Description("'Hold to Quit' UI element")] - public class TestCaseHoldForMenuButton : ManualInputManagerTestCase + public class TestSceneHoldForMenuButton : ManualInputManagerTestScene { private bool exitAction; diff --git a/osu.Game.Tests/Visual/Gameplay/TestCaseKeyCounter.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneKeyCounter.cs similarity index 97% rename from osu.Game.Tests/Visual/Gameplay/TestCaseKeyCounter.cs rename to osu.Game.Tests/Visual/Gameplay/TestSceneKeyCounter.cs index 4b55879224..18088a9a5b 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestCaseKeyCounter.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneKeyCounter.cs @@ -14,7 +14,7 @@ using osuTK.Input; namespace osu.Game.Tests.Visual.Gameplay { [TestFixture] - public class TestCaseKeyCounter : ManualInputManagerTestCase + public class TestSceneKeyCounter : ManualInputManagerTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -23,7 +23,7 @@ namespace osu.Game.Tests.Visual.Gameplay typeof(KeyCounterDisplay) }; - public TestCaseKeyCounter() + public TestSceneKeyCounter() { KeyCounterKeyboard rewindTestKeyCounterKeyboard; KeyCounterDisplay kc = new KeyCounterDisplay diff --git a/osu.Game.Tests/Visual/Gameplay/TestCaseMedalOverlay.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneMedalOverlay.cs similarity index 90% rename from osu.Game.Tests/Visual/Gameplay/TestCaseMedalOverlay.cs rename to osu.Game.Tests/Visual/Gameplay/TestSceneMedalOverlay.cs index dd686c36e6..41722b430e 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestCaseMedalOverlay.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneMedalOverlay.cs @@ -11,7 +11,7 @@ using osu.Game.Users; namespace osu.Game.Tests.Visual.Gameplay { [TestFixture] - public class TestCaseMedalOverlay : OsuTestCase + public class TestSceneMedalOverlay : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -19,7 +19,7 @@ namespace osu.Game.Tests.Visual.Gameplay typeof(DrawableMedal), }; - public TestCaseMedalOverlay() + public TestSceneMedalOverlay() { AddStep(@"display", () => { diff --git a/osu.Game.Tests/Visual/Gameplay/TestCasePause.cs b/osu.Game.Tests/Visual/Gameplay/TestScenePause.cs similarity index 98% rename from osu.Game.Tests/Visual/Gameplay/TestCasePause.cs rename to osu.Game.Tests/Visual/Gameplay/TestScenePause.cs index 53ac990183..b6f8638f4a 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestCasePause.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestScenePause.cs @@ -18,7 +18,7 @@ using osuTK.Input; namespace osu.Game.Tests.Visual.Gameplay { - public class TestCasePause : PlayerTestCase + public class TestScenePause : PlayerTestScene { protected new PausePlayer Player => (PausePlayer)base.Player; @@ -26,7 +26,7 @@ namespace osu.Game.Tests.Visual.Gameplay protected override Container Content => content; - public TestCasePause() + public TestScenePause() : base(new OsuRuleset()) { base.Content.Add(content = new MenuCursorContainer { RelativeSizeAxes = Axes.Both }); @@ -86,8 +86,8 @@ namespace osu.Game.Tests.Visual.Gameplay AddStep("move cursor outside", () => InputManager.MoveMouseTo(Player.ScreenSpaceDrawQuad.TopLeft - new Vector2(10))); pauseAndConfirm(); - resumeAndConfirm(); + resume(); pause(); confirmClockRunning(true); diff --git a/osu.Game.Tests/Visual/Gameplay/TestCasePlayerLoader.cs b/osu.Game.Tests/Visual/Gameplay/TestScenePlayerLoader.cs similarity index 98% rename from osu.Game.Tests/Visual/Gameplay/TestCasePlayerLoader.cs rename to osu.Game.Tests/Visual/Gameplay/TestScenePlayerLoader.cs index b9a0421db7..5c26f733ab 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestCasePlayerLoader.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestScenePlayerLoader.cs @@ -20,7 +20,7 @@ using osu.Game.Tests.Beatmaps; namespace osu.Game.Tests.Visual.Gameplay { - public class TestCasePlayerLoader : ManualInputManagerTestCase + public class TestScenePlayerLoader : ManualInputManagerTestScene { private PlayerLoader loader; private OsuScreenStack stack; diff --git a/osu.Game.Tests/Visual/Gameplay/TestCasePlayerReferenceLeaking.cs b/osu.Game.Tests/Visual/Gameplay/TestScenePlayerReferenceLeaking.cs similarity index 95% rename from osu.Game.Tests/Visual/Gameplay/TestCasePlayerReferenceLeaking.cs rename to osu.Game.Tests/Visual/Gameplay/TestScenePlayerReferenceLeaking.cs index 5937d489f2..d941ad54c0 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestCasePlayerReferenceLeaking.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestScenePlayerReferenceLeaking.cs @@ -10,7 +10,7 @@ using osu.Game.Screens.Play; namespace osu.Game.Tests.Visual.Gameplay { - public class TestCasePlayerReferenceLeaking : AllPlayersTestCase + public class TestScenePlayerReferenceLeaking : AllPlayersTestScene { private readonly WeakList workingWeakReferences = new WeakList(); diff --git a/osu.Game.Tests/Visual/Gameplay/TestCaseReplay.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneReplay.cs similarity index 96% rename from osu.Game.Tests/Visual/Gameplay/TestCaseReplay.cs rename to osu.Game.Tests/Visual/Gameplay/TestSceneReplay.cs index a302c978d2..3fbce9d43c 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestCaseReplay.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneReplay.cs @@ -13,7 +13,7 @@ using osu.Game.Screens.Play; namespace osu.Game.Tests.Visual.Gameplay { [Description("Player instantiated with a replay.")] - public class TestCaseReplay : AllPlayersTestCase + public class TestSceneReplay : AllPlayersTestScene { protected override Player CreatePlayer(Ruleset ruleset) { diff --git a/osu.Game.Tests/Visual/Gameplay/TestCaseReplaySettingsOverlay.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneReplaySettingsOverlay.cs similarity index 92% rename from osu.Game.Tests/Visual/Gameplay/TestCaseReplaySettingsOverlay.cs rename to osu.Game.Tests/Visual/Gameplay/TestSceneReplaySettingsOverlay.cs index 2fdfda0d80..944480243d 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestCaseReplaySettingsOverlay.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneReplaySettingsOverlay.cs @@ -10,9 +10,9 @@ using osu.Game.Screens.Play.PlayerSettings; namespace osu.Game.Tests.Visual.Gameplay { [TestFixture] - public class TestCaseReplaySettingsOverlay : OsuTestCase + public class TestSceneReplaySettingsOverlay : OsuTestScene { - public TestCaseReplaySettingsOverlay() + public TestSceneReplaySettingsOverlay() { ExampleContainer container; diff --git a/osu.Game.Tests/Visual/Gameplay/TestCaseResults.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneResults.cs similarity index 97% rename from osu.Game.Tests/Visual/Gameplay/TestCaseResults.cs rename to osu.Game.Tests/Visual/Gameplay/TestSceneResults.cs index d9da45f39a..f3c8f89db7 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestCaseResults.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneResults.cs @@ -16,7 +16,7 @@ using osu.Game.Users; namespace osu.Game.Tests.Visual.Gameplay { [TestFixture] - public class TestCaseResults : ScreenTestCase + public class TestSceneResults : ScreenTestScene { private BeatmapManager beatmaps; diff --git a/osu.Game.Tests/Visual/Gameplay/TestCaseScoreCounter.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneScoreCounter.cs similarity index 97% rename from osu.Game.Tests/Visual/Gameplay/TestCaseScoreCounter.cs rename to osu.Game.Tests/Visual/Gameplay/TestSceneScoreCounter.cs index 3dd5c99e45..0c9e3fcd73 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestCaseScoreCounter.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneScoreCounter.cs @@ -12,9 +12,9 @@ using osuTK; namespace osu.Game.Tests.Visual.Gameplay { [TestFixture] - public class TestCaseScoreCounter : OsuTestCase + public class TestSceneScoreCounter : OsuTestScene { - public TestCaseScoreCounter() + public TestSceneScoreCounter() { int numerator = 0, denominator = 0; diff --git a/osu.Game.Tests/Visual/Gameplay/TestCaseScrollingHitObjects.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneScrollingHitObjects.cs similarity index 98% rename from osu.Game.Tests/Visual/Gameplay/TestCaseScrollingHitObjects.cs rename to osu.Game.Tests/Visual/Gameplay/TestSceneScrollingHitObjects.cs index 6998f238c9..0a9cdc6a8e 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestCaseScrollingHitObjects.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneScrollingHitObjects.cs @@ -21,7 +21,7 @@ using osuTK; namespace osu.Game.Tests.Visual.Gameplay { [TestFixture] - public class TestCaseScrollingHitObjects : OsuTestCase + public class TestSceneScrollingHitObjects : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { typeof(Playfield) }; @@ -31,7 +31,7 @@ namespace osu.Game.Tests.Visual.Gameplay private readonly ScrollingTestContainer[] scrollContainers = new ScrollingTestContainer[4]; private readonly TestPlayfield[] playfields = new TestPlayfield[4]; - public TestCaseScrollingHitObjects() + public TestSceneScrollingHitObjects() { Add(new GridContainer { diff --git a/osu.Game.Tests/Visual/Gameplay/TestCaseSkinReloadable.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneSkinReloadable.cs similarity index 98% rename from osu.Game.Tests/Visual/Gameplay/TestCaseSkinReloadable.cs rename to osu.Game.Tests/Visual/Gameplay/TestSceneSkinReloadable.cs index 56ab70b400..7d6edd0d12 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestCaseSkinReloadable.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneSkinReloadable.cs @@ -15,7 +15,7 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.Gameplay { - public class TestCaseSkinReloadable : OsuTestCase + public class TestSceneSkinReloadable : OsuTestScene { [Test] public void TestInitialLoad() diff --git a/osu.Game.Tests/Visual/Gameplay/TestCaseSkipOverlay.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneSkipOverlay.cs similarity index 89% rename from osu.Game.Tests/Visual/Gameplay/TestCaseSkipOverlay.cs rename to osu.Game.Tests/Visual/Gameplay/TestSceneSkipOverlay.cs index b46d79ac04..0519660477 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestCaseSkipOverlay.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneSkipOverlay.cs @@ -7,7 +7,7 @@ using osu.Game.Screens.Play; namespace osu.Game.Tests.Visual.Gameplay { [TestFixture] - public class TestCaseSkipOverlay : OsuTestCase + public class TestSceneSkipOverlay : OsuTestScene { protected override void LoadComplete() { diff --git a/osu.Game.Tests/Visual/Gameplay/TestCaseSongProgress.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneSongProgress.cs similarity index 97% rename from osu.Game.Tests/Visual/Gameplay/TestCaseSongProgress.cs rename to osu.Game.Tests/Visual/Gameplay/TestSceneSongProgress.cs index e17dcef19c..af21007efe 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestCaseSongProgress.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneSongProgress.cs @@ -13,7 +13,7 @@ using osu.Game.Screens.Play; namespace osu.Game.Tests.Visual.Gameplay { [TestFixture] - public class TestCaseSongProgress : OsuTestCase + public class TestSceneSongProgress : OsuTestScene { private readonly SongProgress progress; private readonly TestSongProgressGraph graph; @@ -25,7 +25,7 @@ namespace osu.Game.Tests.Visual.Gameplay private readonly FramedClock framedClock; - public TestCaseSongProgress() + public TestSceneSongProgress() { clock = new StopwatchClock(true); diff --git a/osu.Game.Tests/Visual/Gameplay/TestCaseStoryboard.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneStoryboard.cs similarity index 96% rename from osu.Game.Tests/Visual/Gameplay/TestCaseStoryboard.cs rename to osu.Game.Tests/Visual/Gameplay/TestSceneStoryboard.cs index 651683a671..213cdf5e48 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestCaseStoryboard.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneStoryboard.cs @@ -16,12 +16,12 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.Gameplay { [TestFixture] - public class TestCaseStoryboard : OsuTestCase + public class TestSceneStoryboard : OsuTestScene { private readonly Container storyboardContainer; private DrawableStoryboard storyboard; - public TestCaseStoryboard() + public TestSceneStoryboard() { Clock = new FramedClock(); diff --git a/osu.Game.Tests/Visual/Menus/TestCaseDisclaimer.cs b/osu.Game.Tests/Visual/Menus/TestSceneDisclaimer.cs similarity index 94% rename from osu.Game.Tests/Visual/Menus/TestCaseDisclaimer.cs rename to osu.Game.Tests/Visual/Menus/TestSceneDisclaimer.cs index 68a1ceec16..f2718b8e80 100644 --- a/osu.Game.Tests/Visual/Menus/TestCaseDisclaimer.cs +++ b/osu.Game.Tests/Visual/Menus/TestSceneDisclaimer.cs @@ -8,7 +8,7 @@ using osu.Game.Users; namespace osu.Game.Tests.Visual.Menus { - public class TestCaseDisclaimer : ScreenTestCase + public class TestSceneDisclaimer : ScreenTestScene { [Cached(typeof(IAPIProvider))] private readonly DummyAPIAccess api = new DummyAPIAccess(); diff --git a/osu.Game.Tests/Visual/Menus/TestCaseIntroSequence.cs b/osu.Game.Tests/Visual/Menus/TestSceneIntroSequence.cs similarity index 93% rename from osu.Game.Tests/Visual/Menus/TestCaseIntroSequence.cs rename to osu.Game.Tests/Visual/Menus/TestSceneIntroSequence.cs index 0b924e56f5..b59fb18428 100644 --- a/osu.Game.Tests/Visual/Menus/TestCaseIntroSequence.cs +++ b/osu.Game.Tests/Visual/Menus/TestSceneIntroSequence.cs @@ -14,14 +14,14 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.Menus { [TestFixture] - public class TestCaseIntroSequence : OsuTestCase + public class TestSceneIntroSequence : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { typeof(OsuLogo), }; - public TestCaseIntroSequence() + public TestSceneIntroSequence() { OsuLogo logo; diff --git a/osu.Game.Tests/Visual/Menus/TestCaseLoaderAnimation.cs b/osu.Game.Tests/Visual/Menus/TestSceneLoaderAnimation.cs similarity index 96% rename from osu.Game.Tests/Visual/Menus/TestCaseLoaderAnimation.cs rename to osu.Game.Tests/Visual/Menus/TestSceneLoaderAnimation.cs index eb275cbceb..813d4df708 100644 --- a/osu.Game.Tests/Visual/Menus/TestCaseLoaderAnimation.cs +++ b/osu.Game.Tests/Visual/Menus/TestSceneLoaderAnimation.cs @@ -14,14 +14,14 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.Menus { [TestFixture] - public class TestCaseLoaderAnimation : ScreenTestCase + public class TestSceneLoaderAnimation : ScreenTestScene { private TestLoader loader; [Cached] private OsuLogo logo; - public TestCaseLoaderAnimation() + public TestSceneLoaderAnimation() { Child = logo = new OsuLogo { @@ -58,7 +58,7 @@ namespace osu.Game.Tests.Visual.Menus bool logoVisible = false; AddStep("begin loading", () => LoadScreen(loader = new TestLoader())); - AddWaitStep("wait", 2); + AddWaitStep("wait", 3); AddStep("finish loading", () => { logoVisible = loader.Logo?.Alpha > 0; diff --git a/osu.Game.Tests/Visual/Menus/TestCaseToolbar.cs b/osu.Game.Tests/Visual/Menus/TestSceneToolbar.cs similarity index 94% rename from osu.Game.Tests/Visual/Menus/TestCaseToolbar.cs rename to osu.Game.Tests/Visual/Menus/TestSceneToolbar.cs index 4da17f9944..0c789d8cb7 100644 --- a/osu.Game.Tests/Visual/Menus/TestCaseToolbar.cs +++ b/osu.Game.Tests/Visual/Menus/TestSceneToolbar.cs @@ -11,7 +11,7 @@ using osu.Game.Overlays.Toolbar; namespace osu.Game.Tests.Visual.Menus { [TestFixture] - public class TestCaseToolbar : OsuTestCase + public class TestSceneToolbar : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -21,7 +21,7 @@ namespace osu.Game.Tests.Visual.Menus typeof(ToolbarNotificationButton), }; - public TestCaseToolbar() + public TestSceneToolbar() { var toolbar = new Toolbar { State = Visibility.Visible }; ToolbarNotificationButton notificationButton = null; diff --git a/osu.Game.Tests/Visual/Multiplayer/TestCaseLoungeRoomsContainer.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneLoungeRoomsContainer.cs similarity index 98% rename from osu.Game.Tests/Visual/Multiplayer/TestCaseLoungeRoomsContainer.cs rename to osu.Game.Tests/Visual/Multiplayer/TestSceneLoungeRoomsContainer.cs index 497da33a05..eb4dc909df 100644 --- a/osu.Game.Tests/Visual/Multiplayer/TestCaseLoungeRoomsContainer.cs +++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneLoungeRoomsContainer.cs @@ -16,7 +16,7 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.Multiplayer { - public class TestCaseLoungeRoomsContainer : MultiplayerTestCase + public class TestSceneLoungeRoomsContainer : MultiplayerTestScene { public override IReadOnlyList RequiredTypes => new[] { diff --git a/osu.Game.Tests/Visual/Multiplayer/TestCaseMatchHeader.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchHeader.cs similarity index 93% rename from osu.Game.Tests/Visual/Multiplayer/TestCaseMatchHeader.cs rename to osu.Game.Tests/Visual/Multiplayer/TestSceneMatchHeader.cs index 81cb90c7cd..e42042f2ea 100644 --- a/osu.Game.Tests/Visual/Multiplayer/TestCaseMatchHeader.cs +++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchHeader.cs @@ -12,14 +12,14 @@ using osu.Game.Screens.Multi.Match.Components; namespace osu.Game.Tests.Visual.Multiplayer { - public class TestCaseMatchHeader : MultiplayerTestCase + public class TestSceneMatchHeader : MultiplayerTestScene { public override IReadOnlyList RequiredTypes => new[] { typeof(Header) }; - public TestCaseMatchHeader() + public TestSceneMatchHeader() { Room.Playlist.Add(new PlaylistItem { diff --git a/osu.Game.Tests/Visual/Multiplayer/TestCaseMatchHostInfo.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchHostInfo.cs similarity index 90% rename from osu.Game.Tests/Visual/Multiplayer/TestCaseMatchHostInfo.cs rename to osu.Game.Tests/Visual/Multiplayer/TestSceneMatchHostInfo.cs index d2dc417100..808a45cdf0 100644 --- a/osu.Game.Tests/Visual/Multiplayer/TestCaseMatchHostInfo.cs +++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchHostInfo.cs @@ -10,7 +10,7 @@ using osu.Game.Users; namespace osu.Game.Tests.Visual.Multiplayer { - public class TestCaseMatchHostInfo : OsuTestCase + public class TestSceneMatchHostInfo : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -19,7 +19,7 @@ namespace osu.Game.Tests.Visual.Multiplayer private readonly Bindable host = new Bindable(new User { Username = "SomeHost" }); - public TestCaseMatchHostInfo() + public TestSceneMatchHostInfo() { HostInfo hostInfo; diff --git a/osu.Game.Tests/Visual/Multiplayer/TestCaseMatchInfo.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchInfo.cs similarity index 97% rename from osu.Game.Tests/Visual/Multiplayer/TestCaseMatchInfo.cs rename to osu.Game.Tests/Visual/Multiplayer/TestSceneMatchInfo.cs index 6b04b71da4..3f0c0b07b7 100644 --- a/osu.Game.Tests/Visual/Multiplayer/TestCaseMatchInfo.cs +++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchInfo.cs @@ -14,7 +14,7 @@ using osu.Game.Screens.Multi.Match.Components; namespace osu.Game.Tests.Visual.Multiplayer { [TestFixture] - public class TestCaseMatchInfo : MultiplayerTestCase + public class TestSceneMatchInfo : MultiplayerTestScene { public override IReadOnlyList RequiredTypes => new[] { diff --git a/osu.Game.Tests/Visual/Multiplayer/TestCaseMatchLeaderboard.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchLeaderboard.cs similarity index 94% rename from osu.Game.Tests/Visual/Multiplayer/TestCaseMatchLeaderboard.cs rename to osu.Game.Tests/Visual/Multiplayer/TestSceneMatchLeaderboard.cs index 8ec323dbc3..fa3c392b2e 100644 --- a/osu.Game.Tests/Visual/Multiplayer/TestCaseMatchLeaderboard.cs +++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchLeaderboard.cs @@ -12,9 +12,9 @@ using osuTK; namespace osu.Game.Tests.Visual.Multiplayer { - public class TestCaseMatchLeaderboard : MultiplayerTestCase + public class TestSceneMatchLeaderboard : MultiplayerTestScene { - public TestCaseMatchLeaderboard() + public TestSceneMatchLeaderboard() { Room.RoomID.Value = 3; diff --git a/osu.Game.Tests/Visual/Multiplayer/TestCaseMatchParticipants.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchParticipants.cs similarity index 94% rename from osu.Game.Tests/Visual/Multiplayer/TestCaseMatchParticipants.cs rename to osu.Game.Tests/Visual/Multiplayer/TestSceneMatchParticipants.cs index 5382726516..50df4022dc 100644 --- a/osu.Game.Tests/Visual/Multiplayer/TestCaseMatchParticipants.cs +++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchParticipants.cs @@ -9,9 +9,9 @@ using osu.Game.Users; namespace osu.Game.Tests.Visual.Multiplayer { [TestFixture] - public class TestCaseMatchParticipants : MultiplayerTestCase + public class TestSceneMatchParticipants : MultiplayerTestScene { - public TestCaseMatchParticipants() + public TestSceneMatchParticipants() { Add(new Participants { RelativeSizeAxes = Axes.Both }); diff --git a/osu.Game.Tests/Visual/Multiplayer/TestCaseMatchResults.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchResults.cs similarity index 98% rename from osu.Game.Tests/Visual/Multiplayer/TestCaseMatchResults.cs rename to osu.Game.Tests/Visual/Multiplayer/TestSceneMatchResults.cs index 69606c9ba7..7915a981dd 100644 --- a/osu.Game.Tests/Visual/Multiplayer/TestCaseMatchResults.cs +++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchResults.cs @@ -18,7 +18,7 @@ using osu.Game.Users; namespace osu.Game.Tests.Visual.Multiplayer { - public class TestCaseMatchResults : MultiplayerTestCase + public class TestSceneMatchResults : MultiplayerTestScene { public override IReadOnlyList RequiredTypes => new[] { diff --git a/osu.Game.Tests/Visual/Multiplayer/TestCaseMatchSettingsOverlay.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchSettingsOverlay.cs similarity index 98% rename from osu.Game.Tests/Visual/Multiplayer/TestCaseMatchSettingsOverlay.cs rename to osu.Game.Tests/Visual/Multiplayer/TestSceneMatchSettingsOverlay.cs index 51854800e3..21b97fe73b 100644 --- a/osu.Game.Tests/Visual/Multiplayer/TestCaseMatchSettingsOverlay.cs +++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchSettingsOverlay.cs @@ -17,7 +17,7 @@ using osu.Game.Screens.Multi.Match.Components; namespace osu.Game.Tests.Visual.Multiplayer { - public class TestCaseMatchSettingsOverlay : MultiplayerTestCase + public class TestSceneMatchSettingsOverlay : MultiplayerTestScene { public override IReadOnlyList RequiredTypes => new[] { diff --git a/osu.Game.Tests/Visual/Multiplayer/TestCaseMultiHeader.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiHeader.cs similarity index 92% rename from osu.Game.Tests/Visual/Multiplayer/TestCaseMultiHeader.cs rename to osu.Game.Tests/Visual/Multiplayer/TestSceneMultiHeader.cs index b49bb7fd84..3f89f636b1 100644 --- a/osu.Game.Tests/Visual/Multiplayer/TestCaseMultiHeader.cs +++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiHeader.cs @@ -10,9 +10,9 @@ using osu.Game.Screens.Multi; namespace osu.Game.Tests.Visual.Multiplayer { [TestFixture] - public class TestCaseMultiHeader : OsuTestCase + public class TestSceneMultiHeader : OsuTestScene { - public TestCaseMultiHeader() + public TestSceneMultiHeader() { int index = 0; diff --git a/osu.Game.Tests/Visual/Multiplayer/TestCaseMultiScreen.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiScreen.cs similarity index 88% rename from osu.Game.Tests/Visual/Multiplayer/TestCaseMultiScreen.cs rename to osu.Game.Tests/Visual/Multiplayer/TestSceneMultiScreen.cs index ef381efd67..069e133c2b 100644 --- a/osu.Game.Tests/Visual/Multiplayer/TestCaseMultiScreen.cs +++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiScreen.cs @@ -10,7 +10,7 @@ using osu.Game.Screens.Multi.Lounge.Components; namespace osu.Game.Tests.Visual.Multiplayer { [TestFixture] - public class TestCaseMultiScreen : ScreenTestCase + public class TestSceneMultiScreen : ScreenTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -19,7 +19,7 @@ namespace osu.Game.Tests.Visual.Multiplayer typeof(FilterControl) }; - public TestCaseMultiScreen() + public TestSceneMultiScreen() { Screens.Multi.Multiplayer multi = new Screens.Multi.Multiplayer(); diff --git a/osu.Game.Tests/Visual/Multiplayer/TestCaseRoomStatus.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneRoomStatus.cs similarity index 94% rename from osu.Game.Tests/Visual/Multiplayer/TestCaseRoomStatus.cs rename to osu.Game.Tests/Visual/Multiplayer/TestSceneRoomStatus.cs index a7c7d41ed4..74d1645f6d 100644 --- a/osu.Game.Tests/Visual/Multiplayer/TestCaseRoomStatus.cs +++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneRoomStatus.cs @@ -11,7 +11,7 @@ using osu.Game.Screens.Multi.Lounge.Components; namespace osu.Game.Tests.Visual.Multiplayer { - public class TestCaseRoomStatus : OsuTestCase + public class TestSceneRoomStatus : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -20,7 +20,7 @@ namespace osu.Game.Tests.Visual.Multiplayer typeof(RoomStatusPlaying) }; - public TestCaseRoomStatus() + public TestSceneRoomStatus() { Child = new FillFlowContainer { diff --git a/osu.Game.Tests/Visual/Online/TestCaseAccountCreationOverlay.cs b/osu.Game.Tests/Visual/Online/TestSceneAccountCreationOverlay.cs similarity index 93% rename from osu.Game.Tests/Visual/Online/TestCaseAccountCreationOverlay.cs rename to osu.Game.Tests/Visual/Online/TestSceneAccountCreationOverlay.cs index 5cdb90b61f..a7e725ec3f 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseAccountCreationOverlay.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneAccountCreationOverlay.cs @@ -13,7 +13,7 @@ using osu.Game.Users; namespace osu.Game.Tests.Visual.Online { - public class TestCaseAccountCreationOverlay : OsuTestCase + public class TestSceneAccountCreationOverlay : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -28,7 +28,7 @@ namespace osu.Game.Tests.Visual.Online [Cached(typeof(IAPIProvider))] private DummyAPIAccess api = new DummyAPIAccess(); - public TestCaseAccountCreationOverlay() + public TestSceneAccountCreationOverlay() { Container userPanelArea; AccountCreationOverlay accountCreation; diff --git a/osu.Game.Tests/Visual/Online/TestCaseBeatmapSetOverlay.cs b/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs similarity index 99% rename from osu.Game.Tests/Visual/Online/TestCaseBeatmapSetOverlay.cs rename to osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs index 8363f8be04..5910da7b88 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseBeatmapSetOverlay.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs @@ -17,7 +17,7 @@ using System.Linq; namespace osu.Game.Tests.Visual.Online { [TestFixture] - public class TestCaseBeatmapSetOverlay : OsuTestCase + public class TestSceneBeatmapSetOverlay : OsuTestScene { private readonly BeatmapSetOverlay overlay; @@ -41,7 +41,7 @@ namespace osu.Game.Tests.Visual.Online typeof(SuccessRate), }; - public TestCaseBeatmapSetOverlay() + public TestSceneBeatmapSetOverlay() { Add(overlay = new BeatmapSetOverlay()); } diff --git a/osu.Game.Tests/Visual/Online/TestCaseChannelTabControl.cs b/osu.Game.Tests/Visual/Online/TestSceneChannelTabControl.cs similarity index 97% rename from osu.Game.Tests/Visual/Online/TestCaseChannelTabControl.cs rename to osu.Game.Tests/Visual/Online/TestSceneChannelTabControl.cs index 356ede0d57..d93daba4d4 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseChannelTabControl.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneChannelTabControl.cs @@ -17,7 +17,7 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.Online { - public class TestCaseChannelTabControl : OsuTestCase + public class TestSceneChannelTabControl : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -26,7 +26,7 @@ namespace osu.Game.Tests.Visual.Online private readonly ChannelTabControl channelTabControl; - public TestCaseChannelTabControl() + public TestSceneChannelTabControl() { SpriteText currentText; Add(new Container diff --git a/osu.Game.Tests/Visual/Online/TestCaseChatDisplay.cs b/osu.Game.Tests/Visual/Online/TestSceneChatDisplay.cs similarity index 96% rename from osu.Game.Tests/Visual/Online/TestCaseChatDisplay.cs rename to osu.Game.Tests/Visual/Online/TestSceneChatDisplay.cs index 6e20165c1b..634176e65f 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseChatDisplay.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneChatDisplay.cs @@ -15,7 +15,7 @@ using osu.Game.Overlays.Chat.Tabs; namespace osu.Game.Tests.Visual.Online { [Description("Testing chat api and overlay")] - public class TestCaseChatDisplay : OsuTestCase + public class TestSceneChatDisplay : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { diff --git a/osu.Game.Tests/Visual/Online/TestCaseChatLink.cs b/osu.Game.Tests/Visual/Online/TestSceneChatLink.cs similarity index 99% rename from osu.Game.Tests/Visual/Online/TestCaseChatLink.cs rename to osu.Game.Tests/Visual/Online/TestSceneChatLink.cs index 8843f136a1..c18e0e3064 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseChatLink.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneChatLink.cs @@ -21,7 +21,7 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.Online { [TestFixture] - public class TestCaseChatLink : OsuTestCase + public class TestSceneChatLink : OsuTestScene { private readonly TestChatLineContainer textContainer; private readonly DialogOverlay dialogOverlay; @@ -37,7 +37,7 @@ namespace osu.Game.Tests.Visual.Online typeof(MessageFormatter) }; - public TestCaseChatLink() + public TestSceneChatLink() { Add(dialogOverlay = new DialogOverlay { Depth = float.MinValue }); Add(textContainer = new TestChatLineContainer diff --git a/osu.Game.Tests/Visual/Online/TestCaseDirect.cs b/osu.Game.Tests/Visual/Online/TestSceneDirectOverlay.cs similarity index 99% rename from osu.Game.Tests/Visual/Online/TestCaseDirect.cs rename to osu.Game.Tests/Visual/Online/TestSceneDirectOverlay.cs index ff57104d8a..efc12c5fdd 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseDirect.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneDirectOverlay.cs @@ -11,7 +11,7 @@ using osu.Game.Rulesets; namespace osu.Game.Tests.Visual.Online { [TestFixture] - public class TestCaseDirect : OsuTestCase + public class TestSceneDirectOverlay : OsuTestScene { private DirectOverlay direct; private RulesetStore rulesets; diff --git a/osu.Game.Tests/Visual/Online/TestCaseDirectPanel.cs b/osu.Game.Tests/Visual/Online/TestSceneDirectPanel.cs similarity index 96% rename from osu.Game.Tests/Visual/Online/TestCaseDirectPanel.cs rename to osu.Game.Tests/Visual/Online/TestSceneDirectPanel.cs index fbda531792..a3d932a383 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseDirectPanel.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneDirectPanel.cs @@ -13,7 +13,7 @@ using osuTK; namespace osu.Game.Tests.Visual.Online { - public class TestCaseDirectPanel : OsuTestCase + public class TestSceneDirectPanel : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { diff --git a/osu.Game.Tests/Visual/Online/TestCaseExternalLinkButton.cs b/osu.Game.Tests/Visual/Online/TestSceneExternalLinkButton.cs similarity index 84% rename from osu.Game.Tests/Visual/Online/TestCaseExternalLinkButton.cs rename to osu.Game.Tests/Visual/Online/TestSceneExternalLinkButton.cs index a73cbd86d0..637b577021 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseExternalLinkButton.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneExternalLinkButton.cs @@ -8,11 +8,11 @@ using osuTK; namespace osu.Game.Tests.Visual.Online { - public class TestCaseExternalLinkButton : OsuTestCase + public class TestSceneExternalLinkButton : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { typeof(ExternalLinkButton) }; - public TestCaseExternalLinkButton() + public TestSceneExternalLinkButton() { Child = new ExternalLinkButton("https://osu.ppy.sh/home") { diff --git a/osu.Game.Tests/Visual/Online/TestSceneFullscreenOverlay.cs b/osu.Game.Tests/Visual/Online/TestSceneFullscreenOverlay.cs new file mode 100644 index 0000000000..6dc3428bff --- /dev/null +++ b/osu.Game.Tests/Visual/Online/TestSceneFullscreenOverlay.cs @@ -0,0 +1,40 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using NUnit.Framework; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Shapes; +using osu.Game.Overlays; +using osuTK.Graphics; + +namespace osu.Game.Tests.Visual.Online +{ + [TestFixture] + public class TestSceneFullscreenOverlay : OsuTestScene + { + private FullscreenOverlay overlay; + + protected override void LoadComplete() + { + base.LoadComplete(); + + Add(overlay = new TestFullscreenOverlay()); + AddStep(@"toggle", overlay.ToggleVisibility); + } + + private class TestFullscreenOverlay : FullscreenOverlay + { + public TestFullscreenOverlay() + { + Children = new Drawable[] + { + new Box + { + Colour = Color4.Black, + RelativeSizeAxes = Axes.Both, + }, + }; + } + } + } +} diff --git a/osu.Game.Tests/Visual/Online/TestCaseGraph.cs b/osu.Game.Tests/Visual/Online/TestSceneGraph.cs similarity index 94% rename from osu.Game.Tests/Visual/Online/TestCaseGraph.cs rename to osu.Game.Tests/Visual/Online/TestSceneGraph.cs index 77e850fc92..fa433571cf 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseGraph.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneGraph.cs @@ -10,9 +10,9 @@ using osuTK; namespace osu.Game.Tests.Visual.Online { [TestFixture] - public class TestCaseGraph : OsuTestCase + public class TestSceneGraph : OsuTestScene { - public TestCaseGraph() + public TestSceneGraph() { BarGraph graph; diff --git a/osu.Game.Tests/Visual/Online/TestCaseHistoricalSection.cs b/osu.Game.Tests/Visual/Online/TestSceneHistoricalSection.cs similarity index 93% rename from osu.Game.Tests/Visual/Online/TestCaseHistoricalSection.cs rename to osu.Game.Tests/Visual/Online/TestSceneHistoricalSection.cs index 92aa9320c8..455807649a 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseHistoricalSection.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneHistoricalSection.cs @@ -15,7 +15,7 @@ using osu.Game.Users; namespace osu.Game.Tests.Visual.Online { [TestFixture] - public class TestCaseHistoricalSection : OsuTestCase + public class TestSceneHistoricalSection : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] @@ -26,7 +26,7 @@ namespace osu.Game.Tests.Visual.Online typeof(DrawableProfileRow) }; - public TestCaseHistoricalSection() + public TestSceneHistoricalSection() { HistoricalSection section; diff --git a/osu.Game.Tests/Visual/Online/TestCaseRankGraph.cs b/osu.Game.Tests/Visual/Online/TestSceneRankGraph.cs similarity index 97% rename from osu.Game.Tests/Visual/Online/TestCaseRankGraph.cs rename to osu.Game.Tests/Visual/Online/TestSceneRankGraph.cs index a92b788e83..c04a4249cc 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseRankGraph.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneRankGraph.cs @@ -16,7 +16,7 @@ using osuTK; namespace osu.Game.Tests.Visual.Online { [TestFixture] - public class TestCaseRankGraph : OsuTestCase + public class TestSceneRankGraph : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -24,7 +24,7 @@ namespace osu.Game.Tests.Visual.Online typeof(LineGraph) }; - public TestCaseRankGraph() + public TestSceneRankGraph() { RankGraph graph; diff --git a/osu.Game.Tests/Visual/Online/TestCaseScoresContainer.cs b/osu.Game.Tests/Visual/Online/TestSceneScoresContainer.cs similarity index 98% rename from osu.Game.Tests/Visual/Online/TestCaseScoresContainer.cs rename to osu.Game.Tests/Visual/Online/TestSceneScoresContainer.cs index 1ef4558691..6815018be6 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseScoresContainer.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneScoresContainer.cs @@ -18,7 +18,7 @@ using osu.Game.Users; namespace osu.Game.Tests.Visual.Online { - public class TestCaseScoresContainer : OsuTestCase + public class TestSceneScoresContainer : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -31,7 +31,7 @@ namespace osu.Game.Tests.Visual.Online private readonly Box background; - public TestCaseScoresContainer() + public TestSceneScoresContainer() { ScoresContainer scoresContainer; diff --git a/osu.Game.Tests/Visual/Online/TestCaseSocial.cs b/osu.Game.Tests/Visual/Online/TestSceneSocialOverlay.cs similarity index 96% rename from osu.Game.Tests/Visual/Online/TestCaseSocial.cs rename to osu.Game.Tests/Visual/Online/TestSceneSocialOverlay.cs index 48325713df..5cb96c7ed2 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseSocial.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneSocialOverlay.cs @@ -11,19 +11,18 @@ using osu.Game.Users; namespace osu.Game.Tests.Visual.Online { [TestFixture] - public class TestCaseSocial : OsuTestCase + public class TestSceneSocialOverlay : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { typeof(UserPanel), typeof(SocialPanel), typeof(FilterControl), - typeof(SocialOverlay), typeof(SocialGridPanel), typeof(SocialListPanel) }; - public TestCaseSocial() + public TestSceneSocialOverlay() { SocialOverlay s = new SocialOverlay { diff --git a/osu.Game.Tests/Visual/Online/TestCaseStandAloneChatDisplay.cs b/osu.Game.Tests/Visual/Online/TestSceneStandAloneChatDisplay.cs similarity index 96% rename from osu.Game.Tests/Visual/Online/TestCaseStandAloneChatDisplay.cs rename to osu.Game.Tests/Visual/Online/TestSceneStandAloneChatDisplay.cs index 4c4b3b2612..91006bc0d9 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseStandAloneChatDisplay.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneStandAloneChatDisplay.cs @@ -9,7 +9,7 @@ using osuTK; namespace osu.Game.Tests.Visual.Online { - public class TestCaseStandAloneChatDisplay : OsuTestCase + public class TestSceneStandAloneChatDisplay : OsuTestScene { private readonly Channel testChannel = new Channel(); @@ -38,7 +38,7 @@ namespace osu.Game.Tests.Visual.Online private readonly StandAloneChatDisplay chatDisplay; private readonly StandAloneChatDisplay chatDisplay2; - public TestCaseStandAloneChatDisplay() + public TestSceneStandAloneChatDisplay() { Add(channelManager); diff --git a/osu.Game.Tests/Visual/Online/TestCaseUserPanel.cs b/osu.Game.Tests/Visual/Online/TestSceneUserPanel.cs similarity index 96% rename from osu.Game.Tests/Visual/Online/TestCaseUserPanel.cs rename to osu.Game.Tests/Visual/Online/TestSceneUserPanel.cs index b015418d78..fca18a9263 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseUserPanel.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneUserPanel.cs @@ -10,9 +10,9 @@ using osuTK; namespace osu.Game.Tests.Visual.Online { [TestFixture] - public class TestCaseUserPanel : OsuTestCase + public class TestSceneUserPanel : OsuTestScene { - public TestCaseUserPanel() + public TestSceneUserPanel() { UserPanel flyte; UserPanel peppy; diff --git a/osu.Game.Tests/Visual/Online/TestCaseUserProfileHeader.cs b/osu.Game.Tests/Visual/Online/TestSceneUserProfileHeader.cs similarity index 94% rename from osu.Game.Tests/Visual/Online/TestCaseUserProfileHeader.cs rename to osu.Game.Tests/Visual/Online/TestSceneUserProfileHeader.cs index 5f5ba89186..14c81558c1 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseUserProfileHeader.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneUserProfileHeader.cs @@ -14,7 +14,7 @@ using osu.Game.Users; namespace osu.Game.Tests.Visual.Online { - public class TestCaseUserProfileHeader : OsuTestCase + public class TestSceneUserProfileHeader : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -33,12 +33,12 @@ namespace osu.Game.Tests.Visual.Online private readonly ProfileHeader header; - public TestCaseUserProfileHeader() + public TestSceneUserProfileHeader() { header = new ProfileHeader(); Add(header); - AddStep("Show offline dummy", () => header.User.Value = TestCaseUserProfile.TEST_USER); + AddStep("Show offline dummy", () => header.User.Value = TestSceneUserProfileOverlay.TEST_USER); AddStep("Show null dummy", () => header.User.Value = new User { diff --git a/osu.Game.Tests/Visual/Online/TestCaseUserProfile.cs b/osu.Game.Tests/Visual/Online/TestSceneUserProfileOverlay.cs similarity index 96% rename from osu.Game.Tests/Visual/Online/TestCaseUserProfile.cs rename to osu.Game.Tests/Visual/Online/TestSceneUserProfileOverlay.cs index 0789c14b32..c2376aa153 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseUserProfile.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneUserProfileOverlay.cs @@ -17,7 +17,7 @@ using osu.Game.Users; namespace osu.Game.Tests.Visual.Online { [TestFixture] - public class TestCaseUserProfile : OsuTestCase + public class TestSceneUserProfileOverlay : OsuTestScene { private readonly TestUserProfileOverlay profile; @@ -27,7 +27,6 @@ namespace osu.Game.Tests.Visual.Online public override IReadOnlyList RequiredTypes => new[] { typeof(ProfileHeader), - typeof(UserProfileOverlay), typeof(RankGraph), typeof(LineGraph), typeof(SectionsContainer<>), @@ -72,7 +71,7 @@ namespace osu.Game.Tests.Visual.Online Achievements = new User.UserAchievement[0], }; - public TestCaseUserProfile() + public TestSceneUserProfileOverlay() { Add(profile = new TestUserProfileOverlay()); } diff --git a/osu.Game.Tests/Visual/Online/TestCaseUserProfileRecentSection.cs b/osu.Game.Tests/Visual/Online/TestSceneUserProfileRecentSection.cs similarity index 97% rename from osu.Game.Tests/Visual/Online/TestCaseUserProfileRecentSection.cs rename to osu.Game.Tests/Visual/Online/TestSceneUserProfileRecentSection.cs index 6b29ed1e85..d60e723102 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseUserProfileRecentSection.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneUserProfileRecentSection.cs @@ -17,7 +17,7 @@ using osu.Game.Overlays.Profile.Sections.Recent; namespace osu.Game.Tests.Visual.Online { [TestFixture] - public class TestCaseUserProfileRecentSection : OsuTestCase + public class TestSceneUserProfileRecentSection : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -27,7 +27,7 @@ namespace osu.Game.Tests.Visual.Online typeof(MedalIcon) }; - public TestCaseUserProfileRecentSection() + public TestSceneUserProfileRecentSection() { Children = new Drawable[] { diff --git a/osu.Game.Tests/Visual/Online/TestCaseUserRanks.cs b/osu.Game.Tests/Visual/Online/TestSceneUserRanks.cs similarity index 94% rename from osu.Game.Tests/Visual/Online/TestCaseUserRanks.cs rename to osu.Game.Tests/Visual/Online/TestSceneUserRanks.cs index 64257f8877..70118b5ebd 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseUserRanks.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneUserRanks.cs @@ -15,11 +15,11 @@ using osu.Game.Users; namespace osu.Game.Tests.Visual.Online { [TestFixture] - public class TestCaseUserRanks : OsuTestCase + public class TestSceneUserRanks : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { typeof(DrawableProfileScore), typeof(RanksSection) }; - public TestCaseUserRanks() + public TestSceneUserRanks() { RanksSection ranks; diff --git a/osu.Game.Tests/Visual/Settings/TestCaseKeyConfiguration.cs b/osu.Game.Tests/Visual/Settings/TestSceneKeyConfiguration.cs similarity index 63% rename from osu.Game.Tests/Visual/Settings/TestCaseKeyConfiguration.cs rename to osu.Game.Tests/Visual/Settings/TestSceneKeyConfiguration.cs index ce179c21ba..d06d82ddb5 100644 --- a/osu.Game.Tests/Visual/Settings/TestCaseKeyConfiguration.cs +++ b/osu.Game.Tests/Visual/Settings/TestSceneKeyConfiguration.cs @@ -7,19 +7,19 @@ using osu.Game.Overlays; namespace osu.Game.Tests.Visual.Settings { [TestFixture] - public class TestCaseKeyConfiguration : OsuTestCase + public class TestSceneKeyConfiguration : OsuTestScene { - private readonly KeyBindingOverlay overlay; + private readonly KeyBindingPanel panel; - public TestCaseKeyConfiguration() + public TestSceneKeyConfiguration() { - Child = overlay = new KeyBindingOverlay(); + Child = panel = new KeyBindingPanel(); } protected override void LoadComplete() { base.LoadComplete(); - overlay.Show(); + panel.Show(); } } } diff --git a/osu.Game.Tests/Visual/Settings/TestCaseSettings.cs b/osu.Game.Tests/Visual/Settings/TestSceneSettings.cs similarity index 81% rename from osu.Game.Tests/Visual/Settings/TestCaseSettings.cs rename to osu.Game.Tests/Visual/Settings/TestSceneSettings.cs index e846d5c020..964754f8d0 100644 --- a/osu.Game.Tests/Visual/Settings/TestCaseSettings.cs +++ b/osu.Game.Tests/Visual/Settings/TestSceneSettings.cs @@ -9,14 +9,14 @@ using osu.Game.Overlays; namespace osu.Game.Tests.Visual.Settings { [TestFixture] - public class TestCaseSettings : OsuTestCase + public class TestSceneSettings : OsuTestScene { - private readonly SettingsOverlay settings; + private readonly SettingsPanel settings; private readonly DialogOverlay dialogOverlay; - public TestCaseSettings() + public TestSceneSettings() { - settings = new MainSettings + settings = new SettingsOverlay { State = Visibility.Visible }; diff --git a/osu.Game.Tests/Visual/SongSelect/TestCaseBeatmapCarousel.cs b/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapCarousel.cs similarity index 99% rename from osu.Game.Tests/Visual/SongSelect/TestCaseBeatmapCarousel.cs rename to osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapCarousel.cs index 1ffc164026..7c9b7c7815 100644 --- a/osu.Game.Tests/Visual/SongSelect/TestCaseBeatmapCarousel.cs +++ b/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapCarousel.cs @@ -20,7 +20,7 @@ using osu.Game.Screens.Select.Filter; namespace osu.Game.Tests.Visual.SongSelect { [TestFixture] - public class TestCaseBeatmapCarousel : OsuTestCase + public class TestSceneBeatmapCarousel : OsuTestScene { private TestBeatmapCarousel carousel; private RulesetStore rulesets; diff --git a/osu.Game.Tests/Visual/SongSelect/TestCaseBeatmapDetailArea.cs b/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapDetailArea.cs similarity index 98% rename from osu.Game.Tests/Visual/SongSelect/TestCaseBeatmapDetailArea.cs rename to osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapDetailArea.cs index 722a63f2b0..cf4362ba28 100644 --- a/osu.Game.Tests/Visual/SongSelect/TestCaseBeatmapDetailArea.cs +++ b/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapDetailArea.cs @@ -14,11 +14,11 @@ namespace osu.Game.Tests.Visual.SongSelect { [TestFixture] [System.ComponentModel.Description("PlaySongSelect leaderboard/details area")] - public class TestCaseBeatmapDetailArea : OsuTestCase + public class TestSceneBeatmapDetailArea : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { typeof(BeatmapDetails) }; - public TestCaseBeatmapDetailArea() + public TestSceneBeatmapDetailArea() { BeatmapDetailArea detailsArea; Add(detailsArea = new BeatmapDetailArea diff --git a/osu.Game.Tests/Visual/SongSelect/TestCaseBeatmapDetails.cs b/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapDetails.cs similarity index 98% rename from osu.Game.Tests/Visual/SongSelect/TestCaseBeatmapDetails.cs rename to osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapDetails.cs index 37987b8884..acbbd4e18b 100644 --- a/osu.Game.Tests/Visual/SongSelect/TestCaseBeatmapDetails.cs +++ b/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapDetails.cs @@ -10,9 +10,9 @@ using osu.Game.Screens.Select; namespace osu.Game.Tests.Visual.SongSelect { [Description("PlaySongSelect beatmap details")] - public class TestCaseBeatmapDetails : OsuTestCase + public class TestSceneBeatmapDetails : OsuTestScene { - public TestCaseBeatmapDetails() + public TestSceneBeatmapDetails() { BeatmapDetails details; Add(details = new BeatmapDetails diff --git a/osu.Game.Tests/Visual/SongSelect/TestCaseBeatmapInfoWedge.cs b/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapInfoWedge.cs similarity index 99% rename from osu.Game.Tests/Visual/SongSelect/TestCaseBeatmapInfoWedge.cs rename to osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapInfoWedge.cs index 36a7eba37f..b1ed5c46c2 100644 --- a/osu.Game.Tests/Visual/SongSelect/TestCaseBeatmapInfoWedge.cs +++ b/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapInfoWedge.cs @@ -24,7 +24,7 @@ using osuTK; namespace osu.Game.Tests.Visual.SongSelect { [TestFixture] - public class TestCaseBeatmapInfoWedge : OsuTestCase + public class TestSceneBeatmapInfoWedge : OsuTestScene { private RulesetStore rulesets; private TestBeatmapInfoWedge infoWedge; diff --git a/osu.Game.Tests/Visual/SongSelect/TestCaseBeatmapOptionsOverlay.cs b/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapOptionsOverlay.cs similarity index 90% rename from osu.Game.Tests/Visual/SongSelect/TestCaseBeatmapOptionsOverlay.cs rename to osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapOptionsOverlay.cs index 7d09debbd6..ecdc484887 100644 --- a/osu.Game.Tests/Visual/SongSelect/TestCaseBeatmapOptionsOverlay.cs +++ b/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapOptionsOverlay.cs @@ -10,9 +10,9 @@ using osuTK.Input; namespace osu.Game.Tests.Visual.SongSelect { [Description("bottom beatmap details")] - public class TestCaseBeatmapOptionsOverlay : OsuTestCase + public class TestSceneBeatmapOptionsOverlay : OsuTestScene { - public TestCaseBeatmapOptionsOverlay() + public TestSceneBeatmapOptionsOverlay() { var overlay = new BeatmapOptionsOverlay(); diff --git a/osu.Game.Tests/Visual/SongSelect/TestCaseLeaderboard.cs b/osu.Game.Tests/Visual/SongSelect/TestSceneLeaderboard.cs similarity index 99% rename from osu.Game.Tests/Visual/SongSelect/TestCaseLeaderboard.cs rename to osu.Game.Tests/Visual/SongSelect/TestSceneLeaderboard.cs index 13ae6f228a..3d75470328 100644 --- a/osu.Game.Tests/Visual/SongSelect/TestCaseLeaderboard.cs +++ b/osu.Game.Tests/Visual/SongSelect/TestSceneLeaderboard.cs @@ -18,7 +18,7 @@ using osuTK; namespace osu.Game.Tests.Visual.SongSelect { [Description("PlaySongSelect leaderboard")] - public class TestCaseLeaderboard : OsuTestCase + public class TestSceneLeaderboard : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -31,7 +31,7 @@ namespace osu.Game.Tests.Visual.SongSelect private readonly FailableLeaderboard leaderboard; - public TestCaseLeaderboard() + public TestSceneLeaderboard() { Add(leaderboard = new FailableLeaderboard { diff --git a/osu.Game.Tests/Visual/SongSelect/TestCasePlaySongSelect.cs b/osu.Game.Tests/Visual/SongSelect/TestScenePlaySongSelect.cs similarity index 99% rename from osu.Game.Tests/Visual/SongSelect/TestCasePlaySongSelect.cs rename to osu.Game.Tests/Visual/SongSelect/TestScenePlaySongSelect.cs index 7e33f6ce02..7e962dbc06 100644 --- a/osu.Game.Tests/Visual/SongSelect/TestCasePlaySongSelect.cs +++ b/osu.Game.Tests/Visual/SongSelect/TestScenePlaySongSelect.cs @@ -26,7 +26,7 @@ using osu.Game.Screens.Select.Filter; namespace osu.Game.Tests.Visual.SongSelect { [TestFixture] - public class TestCasePlaySongSelect : ScreenTestCase + public class TestScenePlaySongSelect : ScreenTestScene { private BeatmapManager manager; diff --git a/osu.Game.Tests/Visual/TestCaseCharLookup.cs b/osu.Game.Tests/Visual/TestCaseCharLookup.cs deleted file mode 100644 index 0b9413f332..0000000000 --- a/osu.Game.Tests/Visual/TestCaseCharLookup.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. -// See the LICENCE file in the repository root for full licence text. - -using osu.Game.Graphics.Sprites; - -namespace osu.Game.Tests.Visual -{ - public class TestCaseCharLookup : OsuTestCase - { - public TestCaseCharLookup() - { - AddStep("null", () => { }); - AddStep("display acharacter", () => Add(new OsuSpriteText { Text = "振込申請" })); - } - } -} diff --git a/osu.Game.Tests/Visual/TestCaseOsuGame.cs b/osu.Game.Tests/Visual/TestCaseOsuGame.cs deleted file mode 100644 index 9e649b92e4..0000000000 --- a/osu.Game.Tests/Visual/TestCaseOsuGame.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. -// See the LICENCE file in the repository root for full licence text. - -using System; -using System.Collections.Generic; -using NUnit.Framework; -using osu.Framework.Allocation; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Shapes; -using osu.Framework.Platform; -using osu.Game.Screens.Menu; -using osuTK.Graphics; - -namespace osu.Game.Tests.Visual -{ - [TestFixture] - public class TestCaseOsuGame : OsuTestCase - { - public override IReadOnlyList RequiredTypes => new[] - { - typeof(OsuLogo), - }; - - [BackgroundDependencyLoader] - private void load(GameHost host) - { - OsuGame game = new OsuGame(); - game.SetHost(host); - - Children = new Drawable[] - { - new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.Black, - }, - game - }; - } - } -} diff --git a/osu.Game.Tests/Visual/TestSceneOsuGame.cs b/osu.Game.Tests/Visual/TestSceneOsuGame.cs new file mode 100644 index 0000000000..fcc3a3596f --- /dev/null +++ b/osu.Game.Tests/Visual/TestSceneOsuGame.cs @@ -0,0 +1,127 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using System; +using System.Collections.Generic; +using NUnit.Framework; +using osu.Framework.Allocation; +using osu.Framework.Bindables; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Shapes; +using osu.Framework.Graphics.Textures; +using osu.Framework.Platform; +using osu.Game.Audio; +using osu.Game.Beatmaps; +using osu.Game.Configuration; +using osu.Game.Database; +using osu.Game.Graphics; +using osu.Game.Input; +using osu.Game.Input.Bindings; +using osu.Game.IO; +using osu.Game.Online.API; +using osu.Game.Online.Chat; +using osu.Game.Overlays; +using osu.Game.Rulesets; +using osu.Game.Rulesets.Mods; +using osu.Game.Scoring; +using osu.Game.Screens.Menu; +using osu.Game.Skinning; +using osu.Game.Utils; +using osuTK.Graphics; + +namespace osu.Game.Tests.Visual +{ + [TestFixture] + public class TestSceneOsuGame : OsuTestScene + { + public override IReadOnlyList RequiredTypes => new[] + { + typeof(OsuLogo), + }; + + private IReadOnlyList requiredGameDependencies => new[] + { + typeof(OsuGame), + typeof(RavenLogger), + typeof(OsuLogo), + typeof(IdleTracker), + typeof(OnScreenDisplay), + typeof(NotificationOverlay), + typeof(DirectOverlay), + typeof(SocialOverlay), + typeof(ChannelManager), + typeof(ChatOverlay), + typeof(SettingsOverlay), + typeof(UserProfileOverlay), + typeof(BeatmapSetOverlay), + typeof(LoginOverlay), + typeof(MusicController), + typeof(AccountCreationOverlay), + typeof(DialogOverlay), + typeof(ScreenshotManager) + }; + + private IReadOnlyList requiredGameBaseDependencies => new[] + { + typeof(OsuGameBase), + typeof(DatabaseContextFactory), + typeof(Bindable), + typeof(IBindable), + typeof(Bindable>), + typeof(IBindable>), + typeof(LargeTextureStore), + typeof(OsuConfigManager), + typeof(SkinManager), + typeof(ISkinSource), + typeof(IAPIProvider), + typeof(RulesetStore), + typeof(FileStore), + typeof(ScoreManager), + typeof(BeatmapManager), + typeof(KeyBindingStore), + typeof(SettingsStore), + typeof(RulesetConfigCache), + typeof(OsuColour), + typeof(IBindable), + typeof(Bindable), + typeof(GlobalActionContainer), + typeof(PreviewTrackManager), + }; + + [BackgroundDependencyLoader] + private void load(GameHost host, OsuGameBase gameBase) + { + OsuGame game = new OsuGame(); + game.SetHost(host); + + Children = new Drawable[] + { + new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.Black, + }, + game + }; + + AddUntilStep("wait for load", () => game.IsLoaded); + + AddAssert("check OsuGame DI members", () => + { + foreach (var type in requiredGameDependencies) + if (game.Dependencies.Get(type) == null) + throw new Exception($"{type} has not been cached"); + + return true; + }); + AddAssert("check OsuGameBase DI members", () => + { + foreach (var type in requiredGameBaseDependencies) + if (gameBase.Dependencies.Get(type) == null) + throw new Exception($"{type} has not been cached"); + + return true; + }); + } + } +} diff --git a/osu.Game.Tests/Visual/TestCaseOsuScreenStack.cs b/osu.Game.Tests/Visual/TestSceneOsuScreenStack.cs similarity index 97% rename from osu.Game.Tests/Visual/TestCaseOsuScreenStack.cs rename to osu.Game.Tests/Visual/TestSceneOsuScreenStack.cs index 0831228681..53ce25ebb3 100644 --- a/osu.Game.Tests/Visual/TestCaseOsuScreenStack.cs +++ b/osu.Game.Tests/Visual/TestSceneOsuScreenStack.cs @@ -14,7 +14,7 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual { [TestFixture] - public class TestCaseOsuScreenStack : OsuTestCase + public class TestSceneOsuScreenStack : OsuTestScene { private TestOsuScreenStack stack; diff --git a/osu.Game.Tests/Visual/Tournament/TestCaseDrawings.cs b/osu.Game.Tests/Visual/Tournament/TestSceneDrawings.cs similarity index 97% rename from osu.Game.Tests/Visual/Tournament/TestCaseDrawings.cs rename to osu.Game.Tests/Visual/Tournament/TestSceneDrawings.cs index 53fb60bcb6..995819f7ae 100644 --- a/osu.Game.Tests/Visual/Tournament/TestCaseDrawings.cs +++ b/osu.Game.Tests/Visual/Tournament/TestSceneDrawings.cs @@ -10,7 +10,7 @@ using osu.Game.Screens.Tournament.Teams; namespace osu.Game.Tests.Visual.Tournament { [Description("for tournament use")] - public class TestCaseDrawings : ScreenTestCase + public class TestSceneDrawings : ScreenTestScene { [BackgroundDependencyLoader] private void load() diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseBeatSyncedContainer.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneBeatSyncedContainer.cs similarity index 98% rename from osu.Game.Tests/Visual/UserInterface/TestCaseBeatSyncedContainer.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneBeatSyncedContainer.cs index dcd194e050..28f0cc027e 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseBeatSyncedContainer.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneBeatSyncedContainer.cs @@ -20,11 +20,11 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.UserInterface { [TestFixture] - public class TestCaseBeatSyncedContainer : OsuTestCase + public class TestSceneBeatSyncedContainer : OsuTestScene { private readonly MusicController mc; - public TestCaseBeatSyncedContainer() + public TestSceneBeatSyncedContainer() { Clock = new FramedClock(); Clock.ProcessFrame(); diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseBreadcrumbs.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneBreadcrumbs.cs similarity index 93% rename from osu.Game.Tests/Visual/UserInterface/TestCaseBreadcrumbs.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneBreadcrumbs.cs index 5e09e0a5b9..554696765e 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseBreadcrumbs.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneBreadcrumbs.cs @@ -10,11 +10,11 @@ using osu.Game.Graphics.UserInterface; namespace osu.Game.Tests.Visual.UserInterface { [TestFixture] - public class TestCaseBreadcrumbs : OsuTestCase + public class TestSceneBreadcrumbs : OsuTestScene { private readonly BreadcrumbControl breadcrumbs; - public TestCaseBreadcrumbs() + public TestSceneBreadcrumbs() { Add(breadcrumbs = new BreadcrumbControl { diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseButtonSystem.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneButtonSystem.cs similarity index 95% rename from osu.Game.Tests/Visual/UserInterface/TestCaseButtonSystem.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneButtonSystem.cs index 814558547a..6c4d9b20f7 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseButtonSystem.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneButtonSystem.cs @@ -15,7 +15,7 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.UserInterface { [TestFixture] - public class TestCaseButtonSystem : OsuTestCase + public class TestSceneButtonSystem : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { @@ -24,7 +24,7 @@ namespace osu.Game.Tests.Visual.UserInterface typeof(Button) }; - public TestCaseButtonSystem() + public TestSceneButtonSystem() { OsuLogo logo; ButtonSystem buttons; diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseContextMenu.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneContextMenu.cs similarity index 97% rename from osu.Game.Tests/Visual/UserInterface/TestCaseContextMenu.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneContextMenu.cs index 71cde787f9..53693d1b70 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseContextMenu.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneContextMenu.cs @@ -15,14 +15,14 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.UserInterface { [TestFixture] - public class TestCaseContextMenu : OsuTestCase + public class TestSceneContextMenu : OsuTestScene { private const int start_time = 0; private const int duration = 1000; private readonly Container container; - public TestCaseContextMenu() + public TestSceneContextMenu() { Add(new OsuContextMenuContainer { diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseCursors.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneCursors.cs similarity index 99% rename from osu.Game.Tests/Visual/UserInterface/TestCaseCursors.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneCursors.cs index 5f45d9ba4d..590ee4e720 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseCursors.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneCursors.cs @@ -17,12 +17,12 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.UserInterface { [TestFixture] - public class TestCaseCursors : ManualInputManagerTestCase + public class TestSceneCursors : ManualInputManagerTestScene { private readonly MenuCursorContainer menuCursorContainer; private readonly CustomCursorBox[] cursorBoxes = new CustomCursorBox[6]; - public TestCaseCursors() + public TestSceneCursors() { Child = menuCursorContainer = new MenuCursorContainer { diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseDialogOverlay.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneDialogOverlay.cs similarity index 96% rename from osu.Game.Tests/Visual/UserInterface/TestCaseDialogOverlay.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneDialogOverlay.cs index 8964d20564..a6ff3462d4 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseDialogOverlay.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneDialogOverlay.cs @@ -9,9 +9,9 @@ using osu.Game.Overlays.Dialog; namespace osu.Game.Tests.Visual.UserInterface { [TestFixture] - public class TestCaseDialogOverlay : OsuTestCase + public class TestSceneDialogOverlay : OsuTestScene { - public TestCaseDialogOverlay() + public TestSceneDialogOverlay() { DialogOverlay overlay; diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseDrawableDate.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneDrawableDate.cs similarity index 96% rename from osu.Game.Tests/Visual/UserInterface/TestCaseDrawableDate.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneDrawableDate.cs index e8662ce965..19097f33bb 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseDrawableDate.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneDrawableDate.cs @@ -11,9 +11,9 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.UserInterface { - public class TestCaseDrawableDate : OsuTestCase + public class TestSceneDrawableDate : OsuTestScene { - public TestCaseDrawableDate() + public TestSceneDrawableDate() { Child = new FillFlowContainer { diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseHoldToConfirmOverlay.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneHoldToConfirmOverlay.cs similarity index 94% rename from osu.Game.Tests/Visual/UserInterface/TestCaseHoldToConfirmOverlay.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneHoldToConfirmOverlay.cs index 38dc4a11dc..7e6cf1285e 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseHoldToConfirmOverlay.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneHoldToConfirmOverlay.cs @@ -10,11 +10,11 @@ using osu.Game.Screens.Menu; namespace osu.Game.Tests.Visual.UserInterface { - public class TestCaseHoldToConfirmOverlay : OsuTestCase + public class TestSceneHoldToConfirmOverlay : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { typeof(ExitConfirmOverlay) }; - public TestCaseHoldToConfirmOverlay() + public TestSceneHoldToConfirmOverlay() { bool fired = false; diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseIconButton.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneIconButton.cs similarity index 97% rename from osu.Game.Tests/Visual/UserInterface/TestCaseIconButton.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneIconButton.cs index 6bb1347608..0c9ce50288 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseIconButton.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneIconButton.cs @@ -14,9 +14,9 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.UserInterface { [TestFixture] - public class TestCaseIconButton : OsuTestCase + public class TestSceneIconButton : OsuTestScene { - public TestCaseIconButton() + public TestSceneIconButton() { Child = new FillFlowContainer { diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseLabelledTextBox.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneLabelledTextBox.cs similarity index 95% rename from osu.Game.Tests/Visual/UserInterface/TestCaseLabelledTextBox.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneLabelledTextBox.cs index 781dfbdcc1..395905a30d 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseLabelledTextBox.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneLabelledTextBox.cs @@ -12,7 +12,7 @@ using osu.Game.Screens.Edit.Setup.Components.LabelledComponents; namespace osu.Game.Tests.Visual.UserInterface { [TestFixture] - public class TestCaseLabelledTextBox : OsuTestCase + public class TestSceneLabelledTextBox : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseLoadingAnimation.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneLoadingAnimation.cs similarity index 91% rename from osu.Game.Tests/Visual/UserInterface/TestCaseLoadingAnimation.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneLoadingAnimation.cs index 43f6f0e4db..b9a6d74f19 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseLoadingAnimation.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneLoadingAnimation.cs @@ -9,9 +9,9 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.UserInterface { - public class TestCaseLoadingAnimation : GridTestCase + public class TestSceneLoadingAnimation : GridTestScene //todo: this should be an OsuTestScene { - public TestCaseLoadingAnimation() + public TestSceneLoadingAnimation() : base(2, 2) { LoadingAnimation loading; diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseLogoTrackingContainer.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneLogoTrackingContainer.cs similarity index 99% rename from osu.Game.Tests/Visual/UserInterface/TestCaseLogoTrackingContainer.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneLogoTrackingContainer.cs index e45e2e24da..54876dbbda 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseLogoTrackingContainer.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneLogoTrackingContainer.cs @@ -18,7 +18,7 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.UserInterface { - public class TestCaseLogoTrackingContainer : OsuTestCase + public class TestSceneLogoTrackingContainer : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseMods.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneMods.cs similarity index 99% rename from osu.Game.Tests/Visual/UserInterface/TestCaseMods.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneMods.cs index fd003c7ea2..2e36ba39ed 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseMods.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneMods.cs @@ -24,7 +24,7 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.UserInterface { [Description("mod select and icon display")] - public class TestCaseMods : OsuTestCase + public class TestSceneMods : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseMusicController.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneMusicController.cs similarity index 89% rename from osu.Game.Tests/Visual/UserInterface/TestCaseMusicController.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneMusicController.cs index 644c7eb4fc..a62fd6467b 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseMusicController.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneMusicController.cs @@ -10,9 +10,9 @@ using osu.Game.Overlays; namespace osu.Game.Tests.Visual.UserInterface { [TestFixture] - public class TestCaseMusicController : OsuTestCase + public class TestSceneMusicController : OsuTestScene { - public TestCaseMusicController() + public TestSceneMusicController() { Clock = new FramedClock(); diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseNotificationOverlay.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneNotificationOverlay.cs similarity index 98% rename from osu.Game.Tests/Visual/UserInterface/TestCaseNotificationOverlay.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneNotificationOverlay.cs index faf80d22ff..0cb7c2484d 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseNotificationOverlay.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneNotificationOverlay.cs @@ -15,7 +15,7 @@ using osu.Game.Overlays.Notifications; namespace osu.Game.Tests.Visual.UserInterface { [TestFixture] - public class TestCaseNotificationOverlay : OsuTestCase + public class TestSceneNotificationOverlay : OsuTestScene { private readonly NotificationOverlay manager; private readonly List progressingNotifications = new List(); @@ -30,7 +30,7 @@ namespace osu.Game.Tests.Visual.UserInterface typeof(Notification) }; - public TestCaseNotificationOverlay() + public TestSceneNotificationOverlay() { progressingNotifications.Clear(); diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseOnScreenDisplay.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneOnScreenDisplay.cs similarity index 98% rename from osu.Game.Tests/Visual/UserInterface/TestCaseOnScreenDisplay.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneOnScreenDisplay.cs index 7ad42cb926..d900526c07 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseOnScreenDisplay.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneOnScreenDisplay.cs @@ -11,7 +11,7 @@ using osu.Game.Overlays; namespace osu.Game.Tests.Visual.UserInterface { [TestFixture] - public class TestCaseOnScreenDisplay : OsuTestCase + public class TestSceneOnScreenDisplay : OsuTestScene { [BackgroundDependencyLoader] private void load() diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseOsuIcon.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneOsuIcon.cs similarity index 95% rename from osu.Game.Tests/Visual/UserInterface/TestCaseOsuIcon.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneOsuIcon.cs index a57e11cb0c..2c2a28394c 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseOsuIcon.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneOsuIcon.cs @@ -9,7 +9,6 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Sprites; -using osu.Framework.Testing; using osu.Game.Graphics; using osuTK; using osuTK.Graphics; @@ -17,9 +16,9 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.UserInterface { [TestFixture] - public class TestCaseOsuIcon : TestCase + public class TestSceneOsuIcon : OsuTestScene { - public TestCaseOsuIcon() + public TestSceneOsuIcon() { FillFlowContainer flow; diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseParallaxContainer.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneParallaxContainer.cs similarity index 91% rename from osu.Game.Tests/Visual/UserInterface/TestCaseParallaxContainer.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneParallaxContainer.cs index 5de4c3f41f..588b25c02d 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseParallaxContainer.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneParallaxContainer.cs @@ -8,9 +8,9 @@ using osu.Game.Screens.Backgrounds; namespace osu.Game.Tests.Visual.UserInterface { - public class TestCaseParallaxContainer : OsuTestCase + public class TestSceneParallaxContainer : OsuTestScene { - public TestCaseParallaxContainer() + public TestSceneParallaxContainer() { ParallaxContainer parallax; diff --git a/osu.Game.Tests/Visual/UserInterface/TestCasePopupDialog.cs b/osu.Game.Tests/Visual/UserInterface/TestScenePopupDialog.cs similarity index 92% rename from osu.Game.Tests/Visual/UserInterface/TestCasePopupDialog.cs rename to osu.Game.Tests/Visual/UserInterface/TestScenePopupDialog.cs index 2f01f593c7..24140125e0 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCasePopupDialog.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestScenePopupDialog.cs @@ -9,9 +9,9 @@ using osu.Game.Overlays.Dialog; namespace osu.Game.Tests.Visual.UserInterface { [TestFixture] - public class TestCasePopupDialog : OsuTestCase + public class TestScenePopupDialog : OsuTestScene { - public TestCasePopupDialog() + public TestScenePopupDialog() { var popup = new PopupDialog { diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseScreenBreadcrumbControl.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneScreenBreadcrumbControl.cs similarity index 97% rename from osu.Game.Tests/Visual/UserInterface/TestCaseScreenBreadcrumbControl.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneScreenBreadcrumbControl.cs index c92072eb71..9c83fdf96c 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseScreenBreadcrumbControl.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneScreenBreadcrumbControl.cs @@ -16,12 +16,12 @@ using osuTK; namespace osu.Game.Tests.Visual.UserInterface { [TestFixture] - public class TestCaseScreenBreadcrumbControl : OsuTestCase + public class TestSceneScreenBreadcrumbControl : OsuTestScene { private readonly ScreenBreadcrumbControl breadcrumbs; private readonly OsuScreenStack screenStack; - public TestCaseScreenBreadcrumbControl() + public TestSceneScreenBreadcrumbControl() { OsuSpriteText titleText; diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseTabControl.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneTabControl.cs similarity index 93% rename from osu.Game.Tests/Visual/UserInterface/TestCaseTabControl.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneTabControl.cs index 480dc73dde..a884741ff8 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseTabControl.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneTabControl.cs @@ -11,9 +11,9 @@ using osuTK; namespace osu.Game.Tests.Visual.UserInterface { [Description("SongSelect filter control")] - public class TestCaseTabControl : OsuTestCase + public class TestSceneTabControl : OsuTestScene { - public TestCaseTabControl() + public TestSceneTabControl() { OsuSpriteText text; OsuTabControl filter; diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseTwoLayerButton.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneTwoLayerButton.cs similarity index 79% rename from osu.Game.Tests/Visual/UserInterface/TestCaseTwoLayerButton.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneTwoLayerButton.cs index 8d3cc7a0f2..b9ed1a71cc 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseTwoLayerButton.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneTwoLayerButton.cs @@ -7,9 +7,9 @@ using osu.Game.Graphics.UserInterface; namespace osu.Game.Tests.Visual.UserInterface { [Description("mostly back button")] - public class TestCaseTwoLayerButton : OsuTestCase + public class TestSceneTwoLayerButton : OsuTestScene { - public TestCaseTwoLayerButton() + public TestSceneTwoLayerButton() { Add(new BackButton()); } diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseUpdateableBeatmapBackgroundSprite.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneUpdateableBeatmapBackgroundSprite.cs similarity index 98% rename from osu.Game.Tests/Visual/UserInterface/TestCaseUpdateableBeatmapBackgroundSprite.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneUpdateableBeatmapBackgroundSprite.cs index 6185fbd34e..23065629a6 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseUpdateableBeatmapBackgroundSprite.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneUpdateableBeatmapBackgroundSprite.cs @@ -17,7 +17,7 @@ using osuTK; namespace osu.Game.Tests.Visual.UserInterface { - public class TestCaseUpdateableBeatmapBackgroundSprite : OsuTestCase + public class TestSceneUpdateableBeatmapBackgroundSprite : OsuTestScene { private BeatmapSetInfo testBeatmap; private IAPIProvider api; diff --git a/osu.Game.Tests/Visual/UserInterface/TestCaseVolumePieces.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneVolumePieces.cs similarity index 95% rename from osu.Game.Tests/Visual/UserInterface/TestCaseVolumePieces.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneVolumePieces.cs index 3ad1c922e4..2fe6240b22 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestCaseVolumePieces.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneVolumePieces.cs @@ -10,7 +10,7 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.UserInterface { - public class TestCaseVolumePieces : OsuTestCase + public class TestSceneVolumePieces : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { typeof(VolumeMeter), typeof(MuteButton) }; diff --git a/osu.Game.Tests/WaveformTestBeatmap.cs b/osu.Game.Tests/WaveformTestBeatmap.cs index 2028671b0e..f66b374cd7 100644 --- a/osu.Game.Tests/WaveformTestBeatmap.cs +++ b/osu.Game.Tests/WaveformTestBeatmap.cs @@ -13,7 +13,7 @@ using osu.Game.Tests.Resources; namespace osu.Game.Tests { /// - /// A that is used for testcases that include waveforms. + /// A that is used for test scenes that include waveforms. /// public class WaveformTestBeatmap : WorkingBeatmap { diff --git a/osu.Game/Beatmaps/Formats/LegacyDecoder.cs b/osu.Game/Beatmaps/Formats/LegacyDecoder.cs index ad5089958c..eb5bcfe824 100644 --- a/osu.Game/Beatmaps/Formats/LegacyDecoder.cs +++ b/osu.Game/Beatmaps/Formats/LegacyDecoder.cs @@ -54,7 +54,7 @@ namespace osu.Game.Beatmaps.Formats } } - protected virtual bool ShouldSkipLine(string line) => string.IsNullOrWhiteSpace(line) || line.StartsWith("//", StringComparison.Ordinal); + protected virtual bool ShouldSkipLine(string line) => string.IsNullOrWhiteSpace(line) || line.AsSpan().TrimStart().StartsWith("//".AsSpan(), StringComparison.Ordinal); protected virtual void ParseLine(T output, Section section, string line) { diff --git a/osu.Game/Graphics/OsuColour.cs b/osu.Game/Graphics/OsuColour.cs index e1e33b4c57..a73a8bcbc1 100644 --- a/osu.Game/Graphics/OsuColour.cs +++ b/osu.Game/Graphics/OsuColour.cs @@ -68,6 +68,48 @@ namespace osu.Game.Graphics public readonly Color4 GreenDark = FromHex(@"668800"); public readonly Color4 GreenDarker = FromHex(@"445500"); + public readonly Color4 Sky = FromHex(@"6bb5ff"); + public readonly Color4 GreySkyLighter = FromHex(@"c6e3f4"); + public readonly Color4 GreySkyLight = FromHex(@"8ab3cc"); + public readonly Color4 GreySky = FromHex(@"405461"); + public readonly Color4 GreySkyDark = FromHex(@"303d47"); + public readonly Color4 GreySkyDarker = FromHex(@"21272c"); + + public readonly Color4 Seafoam = FromHex(@"05ffa2"); + public readonly Color4 GreySeafoamLighter = FromHex(@"9ebab1"); + public readonly Color4 GreySeafoamLight = FromHex(@"4d7365"); + public readonly Color4 GreySeafoam = FromHex(@"33413c"); + public readonly Color4 GreySeafoamDark = FromHex(@"2c3532"); + public readonly Color4 GreySeafoamDarker = FromHex(@"1e2422"); + + public readonly Color4 Cyan = FromHex(@"05f4fd"); + public readonly Color4 GreyCyanLighter = FromHex(@"77b1b3"); + public readonly Color4 GreyCyanLight = FromHex(@"436d6f"); + public readonly Color4 GreyCyan = FromHex(@"293d3e"); + public readonly Color4 GreyCyanDark = FromHex(@"243536"); + public readonly Color4 GreyCyanDarker = FromHex(@"1e2929"); + + public readonly Color4 Lime = FromHex(@"82ff05"); + public readonly Color4 GreyLimeLighter = FromHex(@"deff87"); + public readonly Color4 GreyLimeLight = FromHex(@"657259"); + public readonly Color4 GreyLime = FromHex(@"3f443a"); + public readonly Color4 GreyLimeDark = FromHex(@"32352e"); + public readonly Color4 GreyLimeDarker = FromHex(@"2e302b"); + + public readonly Color4 Violet = FromHex(@"bf04ff"); + public readonly Color4 GreyVioletLighter = FromHex(@"ebb8fe"); + public readonly Color4 GreyVioletLight = FromHex(@"685370"); + public readonly Color4 GreyViolet = FromHex(@"46334d"); + public readonly Color4 GreyVioletDark = FromHex(@"2c2230"); + public readonly Color4 GreyVioletDarker = FromHex(@"201823"); + + public readonly Color4 Carmine = FromHex(@"ff0542"); + public readonly Color4 GreyCarmineLighter = FromHex(@"deaab4"); + public readonly Color4 GreyCarmineLight = FromHex(@"644f53"); + public readonly Color4 GreyCarmine = FromHex(@"342b2d"); + public readonly Color4 GreyCarmineDark = FromHex(@"302a2b"); + public readonly Color4 GreyCarmineDarker = FromHex(@"241d1e"); + public readonly Color4 Gray0 = FromHex(@"000"); public readonly Color4 Gray1 = FromHex(@"111"); public readonly Color4 Gray2 = FromHex(@"222"); diff --git a/osu.Game/Graphics/UserInterface/OsuTextBox.cs b/osu.Game/Graphics/UserInterface/OsuTextBox.cs index ebe38db60a..89de91bc9b 100644 --- a/osu.Game/Graphics/UserInterface/OsuTextBox.cs +++ b/osu.Game/Graphics/UserInterface/OsuTextBox.cs @@ -30,6 +30,7 @@ namespace osu.Game.Graphics.UserInterface Height = 40; TextContainer.Height = 0.5f; CornerRadius = 5; + LengthLimit = 1000; Current.DisabledChanged += disabled => { Alpha = disabled ? 0.3f : 1; }; } diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 7b2a8184d1..d108bb45f3 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -31,11 +31,9 @@ using osu.Game.Graphics; using osu.Game.Graphics.Containers; using osu.Game.Input; using osu.Game.Overlays.Notifications; -using osu.Game.Rulesets; using osu.Game.Screens.Play; using osu.Game.Input.Bindings; using osu.Game.Online.Chat; -using osu.Game.Rulesets.Mods; using osu.Game.Skinning; using osuTK.Graphics; using osu.Game.Overlays.Volume; @@ -58,16 +56,8 @@ namespace osu.Game private ChannelManager channelManager; - private MusicController musicController; - private NotificationOverlay notifications; - private LoginOverlay loginOverlay; - - private DialogOverlay dialogOverlay; - - private AccountCreationOverlay accountCreation; - private DirectOverlay direct; private SocialOverlay social; @@ -91,29 +81,24 @@ namespace osu.Game private OsuScreenStack screenStack; private VolumeOverlay volume; - private OnScreenDisplay onscreenDisplay; private OsuLogo osuLogo; private MainMenu menuScreen; private Intro introScreen; private Bindable configRuleset; - private readonly Bindable ruleset = new Bindable(); private Bindable configSkin; private readonly string[] args; - private SettingsOverlay settings; + private SettingsPanel settings; private readonly List overlays = new List(); - private readonly List visibleBlockingOverlays = new List(); + private readonly List toolbarElements = new List(); - // todo: move this to SongSelect once Screen has the ability to unsuspend. - [Cached] - [Cached(typeof(IBindable>))] - private readonly Bindable> mods = new Bindable>(Array.Empty()); + private readonly List visibleBlockingOverlays = new List(); public OsuGame(string[] args = null) { @@ -124,10 +109,6 @@ namespace osu.Game RavenLogger = new RavenLogger(this); } - public void ToggleSettings() => settings.ToggleVisibility(); - - public void ToggleDirect() => direct.ToggleVisibility(); - private void updateBlockingOverlayFade() => screenContainer.FadeColour(visibleBlockingOverlays.Any() ? OsuColour.Gray(0.5f) : Color4.White, 500, Easing.OutQuint); @@ -147,12 +128,17 @@ namespace osu.Game /// /// Close all game-wide overlays. /// - /// Whether the toolbar should also be hidden. - public void CloseAllOverlays(bool toolbar = true) + /// Whether the toolbar (and accompanying controls) should also be hidden. + public void CloseAllOverlays(bool hideToolbarElements = true) { foreach (var overlay in overlays) overlay.State = Visibility.Hidden; - if (toolbar) Toolbar.State = Visibility.Hidden; + + if (hideToolbarElements) + { + foreach (var overlay in toolbarElements) + overlay.State = Visibility.Hidden; + } } private DependencyContainer dependencies; @@ -182,15 +168,12 @@ namespace osu.Game dependencies.Cache(RavenLogger); - dependencies.CacheAs(ruleset); - dependencies.CacheAs>(ruleset); - dependencies.Cache(osuLogo = new OsuLogo { Alpha = 0 }); // bind config int to database RulesetInfo configRuleset = LocalConfig.GetBindable(OsuSetting.Ruleset); - ruleset.Value = RulesetStore.GetRuleset(configRuleset.Value) ?? RulesetStore.AvailableRulesets.First(); - ruleset.ValueChanged += r => configRuleset.Value = r.NewValue.ID ?? 0; + Ruleset.Value = RulesetStore.GetRuleset(configRuleset.Value) ?? RulesetStore.AvailableRulesets.First(); + Ruleset.ValueChanged += r => configRuleset.Value = r.NewValue.ID ?? 0; // bind config int to database SkinInfo configSkin = LocalConfig.GetBindable(OsuSetting.Skin); @@ -261,9 +244,9 @@ namespace osu.Game } // Use first beatmap available for current ruleset, else switch ruleset. - var first = databasedSet.Beatmaps.Find(b => b.Ruleset == ruleset.Value) ?? databasedSet.Beatmaps.First(); + var first = databasedSet.Beatmaps.Find(b => b.Ruleset == Ruleset.Value) ?? databasedSet.Beatmaps.First(); - ruleset.Value = first.Ruleset; + Ruleset.Value = first.Ruleset; Beatmap.Value = BeatmapManager.GetWorkingBeatmap(first); }, $"load {beatmap}", bypassScreenAllowChecks: true, targetScreen: typeof(PlaySongSelect)); } @@ -293,9 +276,9 @@ namespace osu.Game performFromMainMenu(() => { - ruleset.Value = databasedScoreInfo.Ruleset; + Ruleset.Value = databasedScoreInfo.Ruleset; Beatmap.Value = BeatmapManager.GetWorkingBeatmap(databasedBeatmap); - mods.Value = databasedScoreInfo.Mods; + Mods.Value = databasedScoreInfo.Mods; menuScreen.Push(new PlayerLoader(() => new ReplayPlayer(databasedScore))); }, $"watch {databasedScoreInfo}", bypassScreenAllowChecks: true); @@ -381,6 +364,8 @@ namespace osu.Game Container logoContainer; + dependencies.CacheAs(idleTracker = new GameIdleTracker(6000)); + AddRange(new Drawable[] { new VolumeControlReceptor @@ -402,7 +387,7 @@ namespace osu.Game rightFloatingOverlayContent = new Container { RelativeSizeAxes = Axes.Both }, leftFloatingOverlayContent = new Container { RelativeSizeAxes = Axes.Both }, topMostOverlayContent = new Container { RelativeSizeAxes = Axes.Both }, - idleTracker = new GameIdleTracker(6000) + idleTracker }); screenStack.ScreenPushed += screenPushed; @@ -426,62 +411,55 @@ namespace osu.Game CloseAllOverlays(false); menuScreen?.MakeCurrent(); }, - }, topMostOverlayContent.Add); + }, d => + { + topMostOverlayContent.Add(d); + toolbarElements.Add(d); + }); loadComponentSingleFile(volume = new VolumeOverlay(), leftFloatingOverlayContent.Add); - loadComponentSingleFile(onscreenDisplay = new OnScreenDisplay(), Add); + loadComponentSingleFile(new OnScreenDisplay(), Add, true); loadComponentSingleFile(notifications = new NotificationOverlay { GetToolbarHeight = () => ToolbarOffset, Anchor = Anchor.TopRight, Origin = Anchor.TopRight, - }, rightFloatingOverlayContent.Add); + }, rightFloatingOverlayContent.Add, true); loadComponentSingleFile(screenshotManager, Add); //overlay elements - loadComponentSingleFile(direct = new DirectOverlay(), overlayContent.Add); - loadComponentSingleFile(social = new SocialOverlay(), overlayContent.Add); - loadComponentSingleFile(channelManager = new ChannelManager(), AddInternal); - loadComponentSingleFile(chatOverlay = new ChatOverlay(), overlayContent.Add); - loadComponentSingleFile(settings = new MainSettings { GetToolbarHeight = () => ToolbarOffset }, leftFloatingOverlayContent.Add); - loadComponentSingleFile(userProfile = new UserProfileOverlay(), overlayContent.Add); - loadComponentSingleFile(beatmapSetOverlay = new BeatmapSetOverlay(), overlayContent.Add); + loadComponentSingleFile(direct = new DirectOverlay(), overlayContent.Add, true); + loadComponentSingleFile(social = new SocialOverlay(), overlayContent.Add, true); + loadComponentSingleFile(channelManager = new ChannelManager(), AddInternal, true); + loadComponentSingleFile(chatOverlay = new ChatOverlay(), overlayContent.Add, true); + loadComponentSingleFile(settings = new SettingsOverlay { GetToolbarHeight = () => ToolbarOffset }, leftFloatingOverlayContent.Add, true); + loadComponentSingleFile(userProfile = new UserProfileOverlay(), overlayContent.Add, true); + loadComponentSingleFile(beatmapSetOverlay = new BeatmapSetOverlay(), overlayContent.Add, true); - loadComponentSingleFile(loginOverlay = new LoginOverlay + loadComponentSingleFile(new LoginOverlay { GetToolbarHeight = () => ToolbarOffset, Anchor = Anchor.TopRight, Origin = Anchor.TopRight, - }, rightFloatingOverlayContent.Add); + }, rightFloatingOverlayContent.Add, true); - loadComponentSingleFile(musicController = new MusicController + loadComponentSingleFile(new MusicController { GetToolbarHeight = () => ToolbarOffset, Anchor = Anchor.TopRight, Origin = Anchor.TopRight, - }, rightFloatingOverlayContent.Add); + }, d => + { + rightFloatingOverlayContent.Add(d); + toolbarElements.Add(d); + }, true); - loadComponentSingleFile(accountCreation = new AccountCreationOverlay(), topMostOverlayContent.Add); - loadComponentSingleFile(dialogOverlay = new DialogOverlay(), topMostOverlayContent.Add); + loadComponentSingleFile(new AccountCreationOverlay(), topMostOverlayContent.Add, true); + loadComponentSingleFile(new DialogOverlay(), topMostOverlayContent.Add, true); loadComponentSingleFile(externalLinkOpener = new ExternalLinkOpener(), topMostOverlayContent.Add); - dependencies.CacheAs(idleTracker); - dependencies.Cache(settings); - dependencies.Cache(onscreenDisplay); - dependencies.Cache(social); - dependencies.Cache(direct); - dependencies.Cache(chatOverlay); - dependencies.Cache(channelManager); - dependencies.Cache(userProfile); - dependencies.Cache(musicController); - dependencies.Cache(beatmapSetOverlay); - dependencies.Cache(notifications); - dependencies.Cache(loginOverlay); - dependencies.Cache(dialogOverlay); - dependencies.Cache(accountCreation); - chatOverlay.StateChanged += state => channelManager.HighPollRate.Value = state == Visibility.Visible; Add(externalLinkOpener = new ExternalLinkOpener()); @@ -544,7 +522,7 @@ namespace osu.Game if (notifications.State == Visibility.Visible) offset -= ToolbarButton.WIDTH / 2; - screenContainer.MoveToX(offset, SettingsOverlay.TRANSITION_LENGTH, Easing.OutQuint); + screenContainer.MoveToX(offset, SettingsPanel.TRANSITION_LENGTH, Easing.OutQuint); } settings.StateChanged += _ => updateScreenOffset(); @@ -610,9 +588,12 @@ namespace osu.Game private Task asyncLoadStream; - private void loadComponentSingleFile(T d, Action add) + private void loadComponentSingleFile(T d, Action add, bool cache = false) where T : Drawable { + if (cache) + dependencies.Cache(d); + // schedule is here to ensure that all component loads are done after LoadComplete is run (and thus all dependencies are cached). // with some better organisation of LoadComplete to do construction and dependency caching in one step, followed by calls to loadComponentSingleFile, // we could avoid the need for scheduling altogether. diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs index 66552c43e0..7b9aed8364 100644 --- a/osu.Game/OsuGameBase.cs +++ b/osu.Game/OsuGameBase.cs @@ -29,6 +29,7 @@ using osu.Game.Input; using osu.Game.Input.Bindings; using osu.Game.IO; using osu.Game.Rulesets; +using osu.Game.Rulesets.Mods; using osu.Game.Scoring; using osu.Game.Skinning; using osuTK.Input; @@ -69,7 +70,16 @@ namespace osu.Game protected override Container Content => content; - private Bindable beatmap; + private Bindable beatmap; // cached via load() method + + [Cached] + [Cached(typeof(IBindable))] + protected readonly Bindable Ruleset = new Bindable(); + + // todo: move this to SongSelect once Screen has the ability to unsuspend. + [Cached] + [Cached(Type = typeof(IBindable>))] + protected readonly Bindable> Mods = new Bindable>(Array.Empty()); protected Bindable Beatmap => beatmap; @@ -220,8 +230,10 @@ namespace osu.Game // TODO: This is temporary until we reimplement the local FPS display. // It's just to allow end-users to access the framework FPS display without knowing the shortcut key. fpsDisplayVisible = LocalConfig.GetBindable(OsuSetting.ShowFpsDisplay); - fpsDisplayVisible.ValueChanged += visible => { FrameStatisticsMode = visible.NewValue ? FrameStatisticsMode.Minimal : FrameStatisticsMode.None; }; + fpsDisplayVisible.ValueChanged += visible => { FrameStatistics.Value = visible.NewValue ? FrameStatisticsMode.Minimal : FrameStatisticsMode.None; }; fpsDisplayVisible.TriggerChange(); + + FrameStatistics.ValueChanged += e => fpsDisplayVisible.Value = e.NewValue != FrameStatisticsMode.None; } private void runMigrations() diff --git a/osu.Game/Overlays/BeatmapSetOverlay.cs b/osu.Game/Overlays/BeatmapSetOverlay.cs index 82bac71f5e..3ed398d31a 100644 --- a/osu.Game/Overlays/BeatmapSetOverlay.cs +++ b/osu.Game/Overlays/BeatmapSetOverlay.cs @@ -4,26 +4,22 @@ using System.Linq; using osu.Framework.Allocation; using osu.Framework.Bindables; -using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Effects; using osu.Framework.Graphics.Shapes; using osu.Framework.Input.Events; using osu.Game.Beatmaps; using osu.Game.Graphics; using osu.Game.Graphics.Containers; -using osu.Game.Online.API; using osu.Game.Online.API.Requests; using osu.Game.Overlays.BeatmapSet; using osu.Game.Overlays.BeatmapSet.Scores; using osu.Game.Rulesets; using osuTK; -using osuTK.Graphics; namespace osu.Game.Overlays { - public class BeatmapSetOverlay : WaveOverlayContainer + public class BeatmapSetOverlay : FullscreenOverlay { private const int fade_duration = 300; @@ -32,7 +28,6 @@ namespace osu.Game.Overlays private readonly Header header; - private IAPIProvider api; private RulesetStore rulesets; private readonly ScrollContainer scroll; @@ -46,24 +41,6 @@ namespace osu.Game.Overlays { Info info; ScoresContainer scores; - Waves.FirstWaveColour = OsuColour.Gray(0.4f); - Waves.SecondWaveColour = OsuColour.Gray(0.3f); - Waves.ThirdWaveColour = OsuColour.Gray(0.2f); - Waves.FourthWaveColour = OsuColour.Gray(0.1f); - - Anchor = Anchor.TopCentre; - Origin = Anchor.TopCentre; - RelativeSizeAxes = Axes.Both; - Width = 0.85f; - - Masking = true; - EdgeEffect = new EdgeEffectParameters - { - Colour = Color4.Black.Opacity(0), - Type = EdgeEffectType.Shadow, - Radius = 3, - Offset = new Vector2(0f, 1f), - }; Children = new Drawable[] { @@ -102,22 +79,15 @@ namespace osu.Game.Overlays } [BackgroundDependencyLoader] - private void load(IAPIProvider api, RulesetStore rulesets) + private void load(RulesetStore rulesets) { - this.api = api; this.rulesets = rulesets; } - protected override void PopIn() + protected override void PopOutComplete() { - base.PopIn(); - FadeEdgeEffectTo(0.25f, WaveContainer.APPEAR_DURATION, Easing.In); - } - - protected override void PopOut() - { - base.PopOut(); - FadeEdgeEffectTo(0, WaveContainer.DISAPPEAR_DURATION, Easing.Out).OnComplete(_ => beatmapSet.Value = null); + base.PopOutComplete(); + beatmapSet.Value = null; } protected override bool OnClick(ClickEvent e) @@ -135,7 +105,7 @@ namespace osu.Game.Overlays beatmapSet.Value = res.ToBeatmapSet(rulesets); header.Picker.Beatmap.Value = header.BeatmapSet.Value.Beatmaps.First(b => b.OnlineBeatmapID == beatmapId); }; - api.Queue(req); + API.Queue(req); Show(); } @@ -144,7 +114,7 @@ namespace osu.Game.Overlays beatmapSet.Value = null; var req = new GetBeatmapSetRequest(beatmapSetId); req.Success += res => beatmapSet.Value = res.ToBeatmapSet(rulesets); - api.Queue(req); + API.Queue(req); Show(); } diff --git a/osu.Game/Overlays/Direct/DirectGridPanel.cs b/osu.Game/Overlays/Direct/DirectGridPanel.cs index eb73a50f99..5756a4593d 100644 --- a/osu.Game/Overlays/Direct/DirectGridPanel.cs +++ b/osu.Game/Overlays/Direct/DirectGridPanel.cs @@ -15,6 +15,7 @@ using osu.Framework.Input.Events; using osu.Framework.Localisation; using osu.Game.Beatmaps; using osu.Game.Beatmaps.Drawables; +using osu.Game.Graphics.Containers; namespace osu.Game.Overlays.Direct { @@ -119,28 +120,16 @@ namespace osu.Game.Overlays.Direct }, Children = new Drawable[] { - new FillFlowContainer + new LinkFlowContainer(s => { - AutoSizeAxes = Axes.Both, - Direction = FillDirection.Horizontal, - Children = new[] - { - new OsuSpriteText - { - Text = "mapped by ", - Font = OsuFont.GetFont(size: 14), - Shadow = false, - Colour = colours.Gray5, - }, - new OsuSpriteText - { - Text = SetInfo.Metadata.Author.Username, - Font = OsuFont.GetFont(size: 14, weight: FontWeight.SemiBold, italics: true), - Shadow = false, - Colour = colours.BlueDark, - }, - }, - }, + s.Shadow = false; + s.Font = OsuFont.GetFont(size: 14); + }).With(d => + { + d.AutoSizeAxes = Axes.Both; + d.AddText("mapped by ", t => t.Colour = colours.Gray5); + d.AddUserLink(SetInfo.Metadata.Author); + }), new Container { AutoSizeAxes = Axes.X, diff --git a/osu.Game/Overlays/Direct/DirectListPanel.cs b/osu.Game/Overlays/Direct/DirectListPanel.cs index d645fd3bda..b731e95d54 100644 --- a/osu.Game/Overlays/Direct/DirectListPanel.cs +++ b/osu.Game/Overlays/Direct/DirectListPanel.cs @@ -15,6 +15,7 @@ using osu.Framework.Graphics.Sprites; using osu.Framework.Localisation; using osu.Game.Beatmaps; using osu.Game.Beatmaps.Drawables; +using osu.Game.Graphics.Containers; namespace osu.Game.Overlays.Direct { @@ -86,8 +87,9 @@ namespace osu.Game.Overlays.Direct { Origin = Anchor.CentreLeft, Anchor = Anchor.CentreLeft, - Size = new Vector2(height / 2), + Size = new Vector2(height / 3), FillMode = FillMode.Fit, + Margin = new MarginPadding { Right = 10 }, }, new FillFlowContainer { @@ -150,7 +152,7 @@ namespace osu.Game.Overlays.Direct Child = new DownloadButton(SetInfo) { Size = new Vector2(height - vertical_padding * 3), - Margin = new MarginPadding { Left = vertical_padding, Right = vertical_padding }, + Margin = new MarginPadding { Left = vertical_padding * 2, Right = vertical_padding }, }, }, new FillFlowContainer @@ -163,26 +165,21 @@ namespace osu.Game.Overlays.Direct { new Statistic(FontAwesome.Solid.PlayCircle, SetInfo.OnlineInfo?.PlayCount ?? 0), new Statistic(FontAwesome.Solid.Heart, SetInfo.OnlineInfo?.FavouriteCount ?? 0), - new FillFlowContainer + new LinkFlowContainer(s => + { + s.Shadow = false; + s.Font = OsuFont.GetFont(size: 14); + }) { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, AutoSizeAxes = Axes.Both, - Direction = FillDirection.Horizontal, - Children = new[] - { - new OsuSpriteText - { - Text = "mapped by ", - Font = OsuFont.GetFont(size: 14) - }, - new OsuSpriteText - { - Text = SetInfo.Metadata.Author.Username, - Font = OsuFont.GetFont(size: 14, weight: FontWeight.SemiBold, italics: true) - }, - }, - }, + }.With(d => + { + d.AutoSizeAxes = Axes.Both; + d.AddText("mapped by "); + d.AddUserLink(SetInfo.Metadata.Author); + }), new OsuSpriteText { Text = SetInfo.Metadata.Source, diff --git a/osu.Game/Overlays/DirectOverlay.cs b/osu.Game/Overlays/DirectOverlay.cs index 40c4c90fca..975bf4e3ca 100644 --- a/osu.Game/Overlays/DirectOverlay.cs +++ b/osu.Game/Overlays/DirectOverlay.cs @@ -14,7 +14,6 @@ using osu.Game.Audio; using osu.Game.Beatmaps; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; -using osu.Game.Online.API; using osu.Game.Online.API.Requests; using osu.Game.Overlays.Direct; using osu.Game.Overlays.SearchableList; @@ -28,7 +27,6 @@ namespace osu.Game.Overlays { private const float panel_padding = 10f; - private IAPIProvider api; private RulesetStore rulesets; private readonly FillFlowContainer resultCountsContainer; @@ -87,8 +85,6 @@ namespace osu.Game.Overlays public DirectOverlay() { - RelativeSizeAxes = Axes.Both; - // osu!direct colours are not part of the standard palette Waves.FirstWaveColour = OsuColour.FromHex(@"19b0e2"); @@ -165,9 +161,8 @@ namespace osu.Game.Overlays } [BackgroundDependencyLoader] - private void load(OsuColour colours, IAPIProvider api, RulesetStore rulesets, PreviewTrackManager previewTrackManager) + private void load(OsuColour colours, RulesetStore rulesets, PreviewTrackManager previewTrackManager) { - this.api = api; this.rulesets = rulesets; this.previewTrackManager = previewTrackManager; @@ -260,7 +255,7 @@ namespace osu.Game.Overlays if (State == Visibility.Hidden) return; - if (api == null) + if (API == null) return; previewTrackManager.StopAnyPlaying(this); @@ -286,7 +281,7 @@ namespace osu.Game.Overlays }); }; - api.Queue(getSetsRequest); + API.Queue(getSetsRequest); } private int distinctCount(List list) => list.Distinct().ToArray().Length; diff --git a/osu.Game/Overlays/FullscreenOverlay.cs b/osu.Game/Overlays/FullscreenOverlay.cs new file mode 100644 index 0000000000..9706f75087 --- /dev/null +++ b/osu.Game/Overlays/FullscreenOverlay.cs @@ -0,0 +1,75 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using osu.Framework.Allocation; +using osu.Framework.Extensions.Color4Extensions; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Effects; +using osu.Game.Graphics; +using osu.Game.Graphics.Containers; +using osu.Game.Online.API; +using osuTK.Graphics; + +namespace osu.Game.Overlays +{ + public abstract class FullscreenOverlay : WaveOverlayContainer, IOnlineComponent + { + [Resolved] + protected IAPIProvider API { get; private set; } + + protected FullscreenOverlay() + { + Waves.FirstWaveColour = OsuColour.Gray(0.4f); + Waves.SecondWaveColour = OsuColour.Gray(0.3f); + Waves.ThirdWaveColour = OsuColour.Gray(0.2f); + Waves.FourthWaveColour = OsuColour.Gray(0.1f); + + RelativeSizeAxes = Axes.Both; + RelativePositionAxes = Axes.Both; + Width = 0.85f; + Anchor = Anchor.TopCentre; + Origin = Anchor.TopCentre; + + Masking = true; + + EdgeEffect = new EdgeEffectParameters + { + Colour = Color4.Black.Opacity(0), + Type = EdgeEffectType.Shadow, + Radius = 10 + }; + } + + protected override void PopIn() + { + base.PopIn(); + FadeEdgeEffectTo(0.4f, WaveContainer.APPEAR_DURATION, Easing.Out); + } + + protected override void PopOut() + { + base.PopOut(); + FadeEdgeEffectTo(0, WaveContainer.DISAPPEAR_DURATION, Easing.In).OnComplete(_ => PopOutComplete()); + } + + protected virtual void PopOutComplete() + { + } + + protected override void LoadComplete() + { + base.LoadComplete(); + API.Register(this); + } + + protected override void Dispose(bool isDisposing) + { + base.Dispose(isDisposing); + API?.Unregister(this); + } + + public virtual void APIStateChanged(IAPIProvider api, APIState state) + { + } + } +} diff --git a/osu.Game/Overlays/KeyBinding/KeyBindingsSubsection.cs b/osu.Game/Overlays/KeyBinding/KeyBindingsSubsection.cs index 53cb3edeca..08288516e3 100644 --- a/osu.Game/Overlays/KeyBinding/KeyBindingsSubsection.cs +++ b/osu.Game/Overlays/KeyBinding/KeyBindingsSubsection.cs @@ -28,7 +28,7 @@ namespace osu.Game.Overlays.KeyBinding this.variant = variant; FlowContent.Spacing = new Vector2(0, 1); - FlowContent.Padding = new MarginPadding { Left = SettingsOverlay.CONTENT_MARGINS, Right = SettingsOverlay.CONTENT_MARGINS }; + FlowContent.Padding = new MarginPadding { Left = SettingsPanel.CONTENT_MARGINS, Right = SettingsPanel.CONTENT_MARGINS }; } [BackgroundDependencyLoader] diff --git a/osu.Game/Overlays/KeyBindingOverlay.cs b/osu.Game/Overlays/KeyBindingPanel.cs similarity index 97% rename from osu.Game/Overlays/KeyBindingOverlay.cs rename to osu.Game/Overlays/KeyBindingPanel.cs index b223d4701d..301c8faca2 100644 --- a/osu.Game/Overlays/KeyBindingOverlay.cs +++ b/osu.Game/Overlays/KeyBindingPanel.cs @@ -18,7 +18,7 @@ using osuTK; namespace osu.Game.Overlays { - public class KeyBindingOverlay : SettingsOverlay + public class KeyBindingPanel : SettingsPanel { protected override Drawable CreateHeader() => new SettingsHeader("key configuration", "Customise your keys!"); @@ -38,7 +38,7 @@ namespace osu.Game.Overlays }); } - public KeyBindingOverlay() + public KeyBindingPanel() : base(true) { } diff --git a/osu.Game/Overlays/MainSettings.cs b/osu.Game/Overlays/MainSettings.cs deleted file mode 100644 index 39bfdfd4d6..0000000000 --- a/osu.Game/Overlays/MainSettings.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. -// See the LICENCE file in the repository root for full licence text. - -using osu.Framework.Allocation; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Containers; -using osu.Game.Overlays.Settings; -using osu.Game.Overlays.Settings.Sections; -using osuTK.Graphics; -using System.Collections.Generic; - -namespace osu.Game.Overlays -{ - public class MainSettings : SettingsOverlay - { - private readonly KeyBindingOverlay keyBindingOverlay; - - protected override IEnumerable CreateSections() => new SettingsSection[] - { - new GeneralSection(), - new GraphicsSection(), - new GameplaySection(), - new AudioSection(), - new SkinSection(), - new InputSection(keyBindingOverlay), - new OnlineSection(), - new MaintenanceSection(), - new DebugSection(), - }; - - protected override Drawable CreateHeader() => new SettingsHeader("settings", "Change the way osu! behaves"); - protected override Drawable CreateFooter() => new SettingsFooter(); - - public MainSettings() - : base(true) - { - keyBindingOverlay = new KeyBindingOverlay - { - Depth = 1, - Anchor = Anchor.TopRight, - }; - keyBindingOverlay.StateChanged += keyBindingOverlay_StateChanged; - } - - public override bool AcceptsFocus => keyBindingOverlay.State != Visibility.Visible; - - private void keyBindingOverlay_StateChanged(Visibility visibility) - { - switch (visibility) - { - case Visibility.Visible: - Background.FadeTo(0.9f, 300, Easing.OutQuint); - Sidebar?.FadeColour(Color4.DarkGray, 300, Easing.OutQuint); - - SectionsContainer.FadeOut(300, Easing.OutQuint); - ContentContainer.MoveToX(-WIDTH, 500, Easing.OutQuint); - break; - - case Visibility.Hidden: - Background.FadeTo(0.6f, 500, Easing.OutQuint); - Sidebar?.FadeColour(Color4.White, 300, Easing.OutQuint); - - SectionsContainer.FadeIn(500, Easing.OutQuint); - ContentContainer.MoveToX(0, 500, Easing.OutQuint); - break; - } - } - - protected override float ExpandedPosition => keyBindingOverlay.State == Visibility.Visible ? -WIDTH : base.ExpandedPosition; - - [BackgroundDependencyLoader] - private void load() - { - ContentContainer.Add(keyBindingOverlay); - } - } -} diff --git a/osu.Game/Overlays/Profile/Sections/Historical/DrawableMostPlayedRow.cs b/osu.Game/Overlays/Profile/Sections/Historical/DrawableMostPlayedRow.cs index b0609e685e..1b286f92d3 100644 --- a/osu.Game/Overlays/Profile/Sections/Historical/DrawableMostPlayedRow.cs +++ b/osu.Game/Overlays/Profile/Sections/Historical/DrawableMostPlayedRow.cs @@ -17,7 +17,6 @@ namespace osu.Game.Overlays.Profile.Sections.Historical { private readonly BeatmapInfo beatmap; private readonly int playCount; - private OsuHoverContainer mapperContainer; public DrawableMostPlayedRow(BeatmapInfo beatmap, int playCount) { @@ -34,36 +33,20 @@ namespace osu.Game.Overlays.Profile.Sections.Historical CoverType = BeatmapSetCoverType.List, }; - [BackgroundDependencyLoader(true)] - private void load(UserProfileOverlay profileOverlay) + [BackgroundDependencyLoader] + private void load() { LeftFlowContainer.Add(new BeatmapMetadataContainer(beatmap)); - LeftFlowContainer.Add(new FillFlowContainer + LeftFlowContainer.Add(new LinkFlowContainer(t => t.Font = OsuFont.GetFont(size: 12)) { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Direction = FillDirection.Horizontal, - Children = new Drawable[] - { - new OsuSpriteText - { - Text = @"mapped by ", - Font = OsuFont.GetFont(size: 12) - }, - mapperContainer = new OsuHoverContainer - { - AutoSizeAxes = Axes.Both, - Children = new Drawable[] - { - new OsuSpriteText - { - Text = beatmap.Metadata.AuthorString, - Font = OsuFont.GetFont(size: 12, weight: FontWeight.Medium, italics: true) - } - } - }, - } - }); + }.With(d => + { + d.AddText("mapped by "); + d.AddUserLink(beatmap.Metadata.Author); + })); RightFlowContainer.Add(new FillFlowContainer { @@ -89,9 +72,6 @@ namespace osu.Game.Overlays.Profile.Sections.Historical }, } }); - - if (profileOverlay != null) - mapperContainer.Action = () => profileOverlay.ShowUser(beatmap.BeatmapSet.Metadata.Author); } } } diff --git a/osu.Game/Overlays/SearchableList/SearchableListOverlay.cs b/osu.Game/Overlays/SearchableList/SearchableListOverlay.cs index 87c369e246..293ee4bcda 100644 --- a/osu.Game/Overlays/SearchableList/SearchableListOverlay.cs +++ b/osu.Game/Overlays/SearchableList/SearchableListOverlay.cs @@ -11,7 +11,7 @@ using osu.Game.Graphics.Containers; namespace osu.Game.Overlays.SearchableList { - public abstract class SearchableListOverlay : WaveOverlayContainer + public abstract class SearchableListOverlay : FullscreenOverlay { public static readonly float WIDTH_PADDING = 80; } @@ -32,8 +32,6 @@ namespace osu.Game.Overlays.SearchableList protected SearchableListOverlay() { - RelativeSizeAxes = Axes.Both; - Children = new Drawable[] { new Box diff --git a/osu.Game/Overlays/Settings/Sections/Input/KeyboardSettings.cs b/osu.Game/Overlays/Settings/Sections/Input/KeyboardSettings.cs index 3f1e77d482..55c7210d6c 100644 --- a/osu.Game/Overlays/Settings/Sections/Input/KeyboardSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Input/KeyboardSettings.cs @@ -9,7 +9,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input { protected override string Header => "Keyboard"; - public KeyboardSettings(KeyBindingOverlay keyConfig) + public KeyboardSettings(KeyBindingPanel keyConfig) { Children = new Drawable[] { diff --git a/osu.Game/Overlays/Settings/Sections/InputSection.cs b/osu.Game/Overlays/Settings/Sections/InputSection.cs index 6a3f8783b0..2a348b4e03 100644 --- a/osu.Game/Overlays/Settings/Sections/InputSection.cs +++ b/osu.Game/Overlays/Settings/Sections/InputSection.cs @@ -12,7 +12,7 @@ namespace osu.Game.Overlays.Settings.Sections public override string Header => "Input"; public override IconUsage Icon => FontAwesome.Regular.Keyboard; - public InputSection(KeyBindingOverlay keyConfig) + public InputSection(KeyBindingPanel keyConfig) { Children = new Drawable[] { diff --git a/osu.Game/Overlays/Settings/SettingsButton.cs b/osu.Game/Overlays/Settings/SettingsButton.cs index ef98c28285..088d69c031 100644 --- a/osu.Game/Overlays/Settings/SettingsButton.cs +++ b/osu.Game/Overlays/Settings/SettingsButton.cs @@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Settings public SettingsButton() { RelativeSizeAxes = Axes.X; - Padding = new MarginPadding { Left = SettingsOverlay.CONTENT_MARGINS, Right = SettingsOverlay.CONTENT_MARGINS }; + Padding = new MarginPadding { Left = SettingsPanel.CONTENT_MARGINS, Right = SettingsPanel.CONTENT_MARGINS }; } public string TooltipText { get; set; } diff --git a/osu.Game/Overlays/Settings/SettingsHeader.cs b/osu.Game/Overlays/Settings/SettingsHeader.cs index fbf29f7ff5..d8ec00bd99 100644 --- a/osu.Game/Overlays/Settings/SettingsHeader.cs +++ b/osu.Game/Overlays/Settings/SettingsHeader.cs @@ -41,7 +41,7 @@ namespace osu.Game.Overlays.Settings Font = OsuFont.GetFont(size: 40), Margin = new MarginPadding { - Left = SettingsOverlay.CONTENT_MARGINS, + Left = SettingsPanel.CONTENT_MARGINS, Top = Toolbar.Toolbar.TOOLTIP_HEIGHT }, }, @@ -52,7 +52,7 @@ namespace osu.Game.Overlays.Settings Font = OsuFont.GetFont(size: 18), Margin = new MarginPadding { - Left = SettingsOverlay.CONTENT_MARGINS, + Left = SettingsPanel.CONTENT_MARGINS, Bottom = 30 }, }, diff --git a/osu.Game/Overlays/Settings/SettingsItem.cs b/osu.Game/Overlays/Settings/SettingsItem.cs index 4b64f942bf..4776cd6442 100644 --- a/osu.Game/Overlays/Settings/SettingsItem.cs +++ b/osu.Game/Overlays/Settings/SettingsItem.cs @@ -87,7 +87,7 @@ namespace osu.Game.Overlays.Settings { RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; - Padding = new MarginPadding { Right = SettingsOverlay.CONTENT_MARGINS }; + Padding = new MarginPadding { Right = SettingsPanel.CONTENT_MARGINS }; InternalChildren = new Drawable[] { @@ -96,7 +96,7 @@ namespace osu.Game.Overlays.Settings { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Padding = new MarginPadding { Left = SettingsOverlay.CONTENT_MARGINS }, + Padding = new MarginPadding { Left = SettingsPanel.CONTENT_MARGINS }, Child = Control = CreateControl() }, }; @@ -131,7 +131,7 @@ namespace osu.Game.Overlays.Settings public RestoreDefaultValueButton() { RelativeSizeAxes = Axes.Y; - Width = SettingsOverlay.CONTENT_MARGINS; + Width = SettingsPanel.CONTENT_MARGINS; Alpha = 0f; } diff --git a/osu.Game/Overlays/Settings/SettingsSection.cs b/osu.Game/Overlays/Settings/SettingsSection.cs index e92f28d5d2..c878a9fc65 100644 --- a/osu.Game/Overlays/Settings/SettingsSection.cs +++ b/osu.Game/Overlays/Settings/SettingsSection.cs @@ -83,7 +83,7 @@ namespace osu.Game.Overlays.Settings Font = OsuFont.GetFont(size: header_size), Text = Header, Colour = colours.Yellow, - Margin = new MarginPadding { Left = SettingsOverlay.CONTENT_MARGINS, Right = SettingsOverlay.CONTENT_MARGINS } + Margin = new MarginPadding { Left = SettingsPanel.CONTENT_MARGINS, Right = SettingsPanel.CONTENT_MARGINS } }, FlowContent } diff --git a/osu.Game/Overlays/Settings/SettingsSubsection.cs b/osu.Game/Overlays/Settings/SettingsSubsection.cs index a1b4d8b131..c9c763e8d4 100644 --- a/osu.Game/Overlays/Settings/SettingsSubsection.cs +++ b/osu.Game/Overlays/Settings/SettingsSubsection.cs @@ -53,7 +53,7 @@ namespace osu.Game.Overlays.Settings new OsuSpriteText { Text = Header.ToUpperInvariant(), - Margin = new MarginPadding { Bottom = 10, Left = SettingsOverlay.CONTENT_MARGINS, Right = SettingsOverlay.CONTENT_MARGINS }, + Margin = new MarginPadding { Bottom = 10, Left = SettingsPanel.CONTENT_MARGINS, Right = SettingsPanel.CONTENT_MARGINS }, Font = OsuFont.GetFont(weight: FontWeight.Black), }, FlowContent diff --git a/osu.Game/Overlays/SettingsOverlay.cs b/osu.Game/Overlays/SettingsOverlay.cs index 174d3a3de1..4f3a71a1b3 100644 --- a/osu.Game/Overlays/SettingsOverlay.cs +++ b/osu.Game/Overlays/SettingsOverlay.cs @@ -1,224 +1,77 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -using System; -using System.Collections.Generic; -using System.Linq; -using osuTK; -using osuTK.Graphics; using osu.Framework.Allocation; -using osu.Framework.Extensions.IEnumerableExtensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Shapes; -using osu.Framework.Input.Events; -using osu.Game.Graphics.Containers; -using osu.Game.Graphics.UserInterface; using osu.Game.Overlays.Settings; +using osu.Game.Overlays.Settings.Sections; +using osuTK.Graphics; +using System.Collections.Generic; namespace osu.Game.Overlays { - public abstract class SettingsOverlay : OsuFocusedOverlayContainer + public class SettingsOverlay : SettingsPanel { - public const float CONTENT_MARGINS = 15; + private readonly KeyBindingPanel keyBindingPanel; - public const float TRANSITION_LENGTH = 600; - - private const float sidebar_width = Sidebar.DEFAULT_WIDTH; - - protected const float WIDTH = 400; - - private const float sidebar_padding = 10; - - protected Container ContentContainer; - - protected override Container Content => ContentContainer; - - protected Sidebar Sidebar; - private SidebarButton selectedSidebarButton; - - protected SettingsSectionsContainer SectionsContainer; - - private SearchTextBox searchTextBox; - - /// - /// Provide a source for the toolbar height. - /// - public Func GetToolbarHeight; - - private readonly bool showSidebar; - - protected Box Background; - - protected SettingsOverlay(bool showSidebar) + protected override IEnumerable CreateSections() => new SettingsSection[] { - this.showSidebar = showSidebar; - RelativeSizeAxes = Axes.Y; - AutoSizeAxes = Axes.X; + new GeneralSection(), + new GraphicsSection(), + new GameplaySection(), + new AudioSection(), + new SkinSection(), + new InputSection(keyBindingPanel), + new OnlineSection(), + new MaintenanceSection(), + new DebugSection(), + }; + + protected override Drawable CreateHeader() => new SettingsHeader("settings", "Change the way osu! behaves"); + protected override Drawable CreateFooter() => new SettingsFooter(); + + public SettingsOverlay() + : base(true) + { + keyBindingPanel = new KeyBindingPanel + { + Depth = 1, + Anchor = Anchor.TopRight, + }; + keyBindingPanel.StateChanged += keyBindingPanelStateChanged; } - protected virtual IEnumerable CreateSections() => null; + public override bool AcceptsFocus => keyBindingPanel.State != Visibility.Visible; + + private void keyBindingPanelStateChanged(Visibility visibility) + { + switch (visibility) + { + case Visibility.Visible: + Background.FadeTo(0.9f, 300, Easing.OutQuint); + Sidebar?.FadeColour(Color4.DarkGray, 300, Easing.OutQuint); + + SectionsContainer.FadeOut(300, Easing.OutQuint); + ContentContainer.MoveToX(-WIDTH, 500, Easing.OutQuint); + break; + + case Visibility.Hidden: + Background.FadeTo(0.6f, 500, Easing.OutQuint); + Sidebar?.FadeColour(Color4.White, 300, Easing.OutQuint); + + SectionsContainer.FadeIn(500, Easing.OutQuint); + ContentContainer.MoveToX(0, 500, Easing.OutQuint); + break; + } + } + + protected override float ExpandedPosition => keyBindingPanel.State == Visibility.Visible ? -WIDTH : base.ExpandedPosition; [BackgroundDependencyLoader] private void load() { - InternalChild = ContentContainer = new Container - { - Width = WIDTH, - RelativeSizeAxes = Axes.Y, - Children = new Drawable[] - { - Background = new Box - { - Anchor = Anchor.TopRight, - Origin = Anchor.TopRight, - Scale = new Vector2(2, 1), // over-extend to the left for transitions - RelativeSizeAxes = Axes.Both, - Colour = Color4.Black, - Alpha = 0.6f, - }, - SectionsContainer = new SettingsSectionsContainer - { - Masking = true, - RelativeSizeAxes = Axes.Both, - ExpandableHeader = CreateHeader(), - FixedHeader = searchTextBox = new SearchTextBox - { - RelativeSizeAxes = Axes.X, - Origin = Anchor.TopCentre, - Anchor = Anchor.TopCentre, - Width = 0.95f, - Margin = new MarginPadding - { - Top = 20, - Bottom = 20 - }, - Exit = Hide, - }, - Footer = CreateFooter() - }, - } - }; - - if (showSidebar) - { - AddInternal(Sidebar = new Sidebar { Width = sidebar_width }); - - SectionsContainer.SelectedSection.ValueChanged += section => - { - selectedSidebarButton.Selected = false; - selectedSidebarButton = Sidebar.Children.Single(b => b.Section == section.NewValue); - selectedSidebarButton.Selected = true; - }; - } - - searchTextBox.Current.ValueChanged += term => SectionsContainer.SearchContainer.SearchTerm = term.NewValue; - - CreateSections()?.ForEach(AddSection); - } - - protected void AddSection(SettingsSection section) - { - SectionsContainer.Add(section); - - if (Sidebar != null) - { - var button = new SidebarButton - { - Section = section, - Action = s => - { - SectionsContainer.ScrollTo(s); - Sidebar.State = ExpandedState.Contracted; - }, - }; - - Sidebar.Add(button); - - if (selectedSidebarButton == null) - { - selectedSidebarButton = Sidebar.Children.First(); - selectedSidebarButton.Selected = true; - } - } - } - - protected virtual Drawable CreateHeader() => new Container(); - - protected virtual Drawable CreateFooter() => new Container(); - - protected override void PopIn() - { - base.PopIn(); - - ContentContainer.MoveToX(ExpandedPosition, TRANSITION_LENGTH, Easing.OutQuint); - - Sidebar?.MoveToX(0, TRANSITION_LENGTH, Easing.OutQuint); - this.FadeTo(1, TRANSITION_LENGTH, Easing.OutQuint); - - searchTextBox.HoldFocus = true; - } - - protected virtual float ExpandedPosition => 0; - - protected override void PopOut() - { - base.PopOut(); - - ContentContainer.MoveToX(-WIDTH, TRANSITION_LENGTH, Easing.OutQuint); - - Sidebar?.MoveToX(-sidebar_width, TRANSITION_LENGTH, Easing.OutQuint); - this.FadeTo(0, TRANSITION_LENGTH, Easing.OutQuint); - - searchTextBox.HoldFocus = false; - if (searchTextBox.HasFocus) - GetContainingInputManager().ChangeFocus(null); - } - - public override bool AcceptsFocus => true; - - protected override void OnFocus(FocusEvent e) - { - searchTextBox.TakeFocus(); - base.OnFocus(e); - } - - protected override void UpdateAfterChildren() - { - base.UpdateAfterChildren(); - - ContentContainer.Margin = new MarginPadding { Left = Sidebar?.DrawWidth ?? 0 }; - ContentContainer.Padding = new MarginPadding { Top = GetToolbarHeight?.Invoke() ?? 0 }; - } - - protected class SettingsSectionsContainer : SectionsContainer - { - public SearchContainer SearchContainer; - - protected override FlowContainer CreateScrollContentContainer() - => SearchContainer = new SearchContainer - { - AutoSizeAxes = Axes.Y, - RelativeSizeAxes = Axes.X, - Direction = FillDirection.Vertical, - }; - - public SettingsSectionsContainer() - { - HeaderBackground = new Box - { - Colour = Color4.Black, - RelativeSizeAxes = Axes.Both - }; - } - - protected override void UpdateAfterChildren() - { - base.UpdateAfterChildren(); - - // no null check because the usage of this class is strict - HeaderBackground.Alpha = -ExpandableHeader.Y / ExpandableHeader.LayoutSize.Y * 0.5f; - } + ContentContainer.Add(keyBindingPanel); } } } diff --git a/osu.Game/Overlays/SettingsPanel.cs b/osu.Game/Overlays/SettingsPanel.cs new file mode 100644 index 0000000000..85b74c0fad --- /dev/null +++ b/osu.Game/Overlays/SettingsPanel.cs @@ -0,0 +1,224 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using System; +using System.Collections.Generic; +using System.Linq; +using osuTK; +using osuTK.Graphics; +using osu.Framework.Allocation; +using osu.Framework.Extensions.IEnumerableExtensions; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Shapes; +using osu.Framework.Input.Events; +using osu.Game.Graphics.Containers; +using osu.Game.Graphics.UserInterface; +using osu.Game.Overlays.Settings; + +namespace osu.Game.Overlays +{ + public abstract class SettingsPanel : OsuFocusedOverlayContainer + { + public const float CONTENT_MARGINS = 15; + + public const float TRANSITION_LENGTH = 600; + + private const float sidebar_width = Sidebar.DEFAULT_WIDTH; + + protected const float WIDTH = 400; + + private const float sidebar_padding = 10; + + protected Container ContentContainer; + + protected override Container Content => ContentContainer; + + protected Sidebar Sidebar; + private SidebarButton selectedSidebarButton; + + protected SettingsSectionsContainer SectionsContainer; + + private SearchTextBox searchTextBox; + + /// + /// Provide a source for the toolbar height. + /// + public Func GetToolbarHeight; + + private readonly bool showSidebar; + + protected Box Background; + + protected SettingsPanel(bool showSidebar) + { + this.showSidebar = showSidebar; + RelativeSizeAxes = Axes.Y; + AutoSizeAxes = Axes.X; + } + + protected virtual IEnumerable CreateSections() => null; + + [BackgroundDependencyLoader] + private void load() + { + InternalChild = ContentContainer = new Container + { + Width = WIDTH, + RelativeSizeAxes = Axes.Y, + Children = new Drawable[] + { + Background = new Box + { + Anchor = Anchor.TopRight, + Origin = Anchor.TopRight, + Scale = new Vector2(2, 1), // over-extend to the left for transitions + RelativeSizeAxes = Axes.Both, + Colour = Color4.Black, + Alpha = 0.6f, + }, + SectionsContainer = new SettingsSectionsContainer + { + Masking = true, + RelativeSizeAxes = Axes.Both, + ExpandableHeader = CreateHeader(), + FixedHeader = searchTextBox = new SearchTextBox + { + RelativeSizeAxes = Axes.X, + Origin = Anchor.TopCentre, + Anchor = Anchor.TopCentre, + Width = 0.95f, + Margin = new MarginPadding + { + Top = 20, + Bottom = 20 + }, + Exit = Hide, + }, + Footer = CreateFooter() + }, + } + }; + + if (showSidebar) + { + AddInternal(Sidebar = new Sidebar { Width = sidebar_width }); + + SectionsContainer.SelectedSection.ValueChanged += section => + { + selectedSidebarButton.Selected = false; + selectedSidebarButton = Sidebar.Children.Single(b => b.Section == section.NewValue); + selectedSidebarButton.Selected = true; + }; + } + + searchTextBox.Current.ValueChanged += term => SectionsContainer.SearchContainer.SearchTerm = term.NewValue; + + CreateSections()?.ForEach(AddSection); + } + + protected void AddSection(SettingsSection section) + { + SectionsContainer.Add(section); + + if (Sidebar != null) + { + var button = new SidebarButton + { + Section = section, + Action = s => + { + SectionsContainer.ScrollTo(s); + Sidebar.State = ExpandedState.Contracted; + }, + }; + + Sidebar.Add(button); + + if (selectedSidebarButton == null) + { + selectedSidebarButton = Sidebar.Children.First(); + selectedSidebarButton.Selected = true; + } + } + } + + protected virtual Drawable CreateHeader() => new Container(); + + protected virtual Drawable CreateFooter() => new Container(); + + protected override void PopIn() + { + base.PopIn(); + + ContentContainer.MoveToX(ExpandedPosition, TRANSITION_LENGTH, Easing.OutQuint); + + Sidebar?.MoveToX(0, TRANSITION_LENGTH, Easing.OutQuint); + this.FadeTo(1, TRANSITION_LENGTH, Easing.OutQuint); + + searchTextBox.HoldFocus = true; + } + + protected virtual float ExpandedPosition => 0; + + protected override void PopOut() + { + base.PopOut(); + + ContentContainer.MoveToX(-WIDTH, TRANSITION_LENGTH, Easing.OutQuint); + + Sidebar?.MoveToX(-sidebar_width, TRANSITION_LENGTH, Easing.OutQuint); + this.FadeTo(0, TRANSITION_LENGTH, Easing.OutQuint); + + searchTextBox.HoldFocus = false; + if (searchTextBox.HasFocus) + GetContainingInputManager().ChangeFocus(null); + } + + public override bool AcceptsFocus => true; + + protected override void OnFocus(FocusEvent e) + { + searchTextBox.TakeFocus(); + base.OnFocus(e); + } + + protected override void UpdateAfterChildren() + { + base.UpdateAfterChildren(); + + ContentContainer.Margin = new MarginPadding { Left = Sidebar?.DrawWidth ?? 0 }; + ContentContainer.Padding = new MarginPadding { Top = GetToolbarHeight?.Invoke() ?? 0 }; + } + + protected class SettingsSectionsContainer : SectionsContainer + { + public SearchContainer SearchContainer; + + protected override FlowContainer CreateScrollContentContainer() + => SearchContainer = new SearchContainer + { + AutoSizeAxes = Axes.Y, + RelativeSizeAxes = Axes.X, + Direction = FillDirection.Vertical, + }; + + public SettingsSectionsContainer() + { + HeaderBackground = new Box + { + Colour = Color4.Black, + RelativeSizeAxes = Axes.Both + }; + } + + protected override void UpdateAfterChildren() + { + base.UpdateAfterChildren(); + + // no null check because the usage of this class is strict + HeaderBackground.Alpha = -ExpandableHeader.Y / ExpandableHeader.LayoutSize.Y * 0.5f; + } + } + } +} diff --git a/osu.Game/Overlays/SocialOverlay.cs b/osu.Game/Overlays/SocialOverlay.cs index e6d0c2fe40..2baa614365 100644 --- a/osu.Game/Overlays/SocialOverlay.cs +++ b/osu.Game/Overlays/SocialOverlay.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; -using osu.Framework.Allocation; using osu.Framework.Bindables; using osuTK; using osuTK.Graphics; @@ -20,9 +19,8 @@ using osu.Framework.Threading; namespace osu.Game.Overlays { - public class SocialOverlay : SearchableListOverlay, IOnlineComponent + public class SocialOverlay : SearchableListOverlay { - private IAPIProvider api; private readonly LoadingAnimation loading; private FillFlowContainer panels; @@ -88,13 +86,6 @@ namespace osu.Game.Overlays currentQuery.BindTo(Filter.Search.Current); } - [BackgroundDependencyLoader] - private void load(IAPIProvider api) - { - this.api = api; - api.Register(this); - } - private void recreatePanels(PanelDisplayStyle displayStyle) { clearPanels(); @@ -159,7 +150,7 @@ namespace osu.Game.Overlays loading.Hide(); getUsersRequest?.Cancel(); - if (api?.IsLoggedIn != true) + if (API?.IsLoggedIn != true) return; switch (Header.Tabs.Current.Value) @@ -167,13 +158,13 @@ namespace osu.Game.Overlays case SocialTab.Friends: var friendRequest = new GetFriendsRequest(); // TODO filter arguments? friendRequest.Success += updateUsers; - api.Queue(getUsersRequest = friendRequest); + API.Queue(getUsersRequest = friendRequest); break; default: var userRequest = new GetUsersRequest(); // TODO filter arguments! userRequest.Success += response => updateUsers(response.Select(r => r.User)); - api.Queue(getUsersRequest = userRequest); + API.Queue(getUsersRequest = userRequest); break; } @@ -196,7 +187,7 @@ namespace osu.Game.Overlays } } - public void APIStateChanged(IAPIProvider api, APIState state) + public override void APIStateChanged(IAPIProvider api, APIState state) { switch (state) { diff --git a/osu.Game/Overlays/Toolbar/ToolbarSettingsButton.cs b/osu.Game/Overlays/Toolbar/ToolbarSettingsButton.cs index 08f8f867fd..79942012f9 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarSettingsButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarSettingsButton.cs @@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Toolbar } [BackgroundDependencyLoader(true)] - private void load(MainSettings settings) + private void load(SettingsOverlay settings) { StateContainer = settings; } diff --git a/osu.Game/Overlays/UserProfileOverlay.cs b/osu.Game/Overlays/UserProfileOverlay.cs index 1c242e3768..8a133a1d1e 100644 --- a/osu.Game/Overlays/UserProfileOverlay.cs +++ b/osu.Game/Overlays/UserProfileOverlay.cs @@ -3,76 +3,31 @@ using System.Linq; using osu.Framework.Allocation; -using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; -using osu.Framework.Graphics.Effects; using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.UserInterface; using osu.Game.Graphics; using osu.Game.Graphics.Containers; using osu.Game.Graphics.UserInterface; -using osu.Game.Online.API; using osu.Game.Online.API.Requests; using osu.Game.Overlays.Profile; using osu.Game.Overlays.Profile.Sections; using osu.Game.Users; using osuTK; -using osuTK.Graphics; namespace osu.Game.Overlays { - public class UserProfileOverlay : WaveOverlayContainer + public class UserProfileOverlay : FullscreenOverlay { private ProfileSection lastSection; private ProfileSection[] sections; private GetUserRequest userReq; - private IAPIProvider api; protected ProfileHeader Header; private SectionsContainer sectionsContainer; private ProfileTabControl tabs; public const float CONTENT_X_MARGIN = 70; - public UserProfileOverlay() - { - Waves.FirstWaveColour = OsuColour.Gray(0.4f); - Waves.SecondWaveColour = OsuColour.Gray(0.3f); - Waves.ThirdWaveColour = OsuColour.Gray(0.2f); - Waves.FourthWaveColour = OsuColour.Gray(0.1f); - - RelativeSizeAxes = Axes.Both; - RelativePositionAxes = Axes.Both; - Width = 0.85f; - Anchor = Anchor.TopCentre; - Origin = Anchor.TopCentre; - - Masking = true; - EdgeEffect = new EdgeEffectParameters - { - Colour = Color4.Black.Opacity(0), - Type = EdgeEffectType.Shadow, - Radius = 10 - }; - } - - [BackgroundDependencyLoader] - private void load(IAPIProvider api) - { - this.api = api; - } - - protected override void PopIn() - { - base.PopIn(); - FadeEdgeEffectTo(0.5f, WaveContainer.APPEAR_DURATION, Easing.In); - } - - protected override void PopOut() - { - base.PopOut(); - FadeEdgeEffectTo(0, WaveContainer.DISAPPEAR_DURATION, Easing.Out); - } - public void ShowUser(long userId) => ShowUser(new User { Id = userId }); public void ShowUser(User user, bool fetchOnline = true) @@ -154,7 +109,7 @@ namespace osu.Game.Overlays { userReq = new GetUserRequest(user.Id); userReq.Success += userLoadComplete; - api.Queue(userReq); + API.Queue(userReq); } else { diff --git a/osu.Game/Screens/Menu/MainMenu.cs b/osu.Game/Screens/Menu/MainMenu.cs index 21fc53be6e..788cad3bad 100644 --- a/osu.Game/Screens/Menu/MainMenu.cs +++ b/osu.Game/Screens/Menu/MainMenu.cs @@ -20,6 +20,7 @@ using osu.Game.Screens.Multi; using osu.Game.Screens.Select; using osu.Game.Screens.Tournament; using osu.Framework.Platform; +using osu.Game.Overlays; namespace osu.Game.Screens.Menu { @@ -45,7 +46,7 @@ namespace osu.Game.Screens.Menu protected override BackgroundScreen CreateBackground() => background; [BackgroundDependencyLoader(true)] - private void load(OsuGame game = null) + private void load(DirectOverlay direct, SettingsOverlay settings) { if (host.CanExit) AddInternal(new ExitConfirmOverlay { Action = this.Exit }); @@ -86,11 +87,8 @@ namespace osu.Game.Screens.Menu } }; - if (game != null) - { - buttons.OnSettings = game.ToggleSettings; - buttons.OnDirect = game.ToggleDirect; - } + buttons.OnSettings = () => settings?.ToggleVisibility(); + buttons.OnDirect = () => direct?.ToggleVisibility(); LoadComponentAsync(background = new BackgroundScreenDefault()); preloadSongSelect(); diff --git a/osu.Game/Storyboards/Drawables/DrawableStoryboardAnimation.cs b/osu.Game/Storyboards/Drawables/DrawableStoryboardAnimation.cs index d01fba7d39..de3077c025 100644 --- a/osu.Game/Storyboards/Drawables/DrawableStoryboardAnimation.cs +++ b/osu.Game/Storyboards/Drawables/DrawableStoryboardAnimation.cs @@ -1,6 +1,7 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using System; using osuTK; using osu.Framework.Allocation; using osu.Framework.Bindables; @@ -66,13 +67,11 @@ namespace osu.Game.Storyboards.Drawables [BackgroundDependencyLoader] private void load(IBindable beatmap, TextureStore textureStore) { - var basePath = Animation.Path.ToLowerInvariant(); - for (var frame = 0; frame < Animation.FrameCount; frame++) { - var framePath = basePath.Replace(".", frame + "."); + var framePath = Animation.Path.Replace(".", frame + "."); - var path = beatmap.Value.BeatmapSetInfo.Files.Find(f => f.Filename.ToLowerInvariant() == framePath)?.FileInfo.StoragePath; + var path = beatmap.Value.BeatmapSetInfo.Files.Find(f => f.Filename.Equals(framePath, StringComparison.InvariantCultureIgnoreCase))?.FileInfo.StoragePath; if (path == null) continue; diff --git a/osu.Game/Storyboards/Drawables/DrawableStoryboardSprite.cs b/osu.Game/Storyboards/Drawables/DrawableStoryboardSprite.cs index 604260a38c..5f1f5ddacb 100644 --- a/osu.Game/Storyboards/Drawables/DrawableStoryboardSprite.cs +++ b/osu.Game/Storyboards/Drawables/DrawableStoryboardSprite.cs @@ -1,6 +1,7 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using System; using osuTK; using osu.Framework.Allocation; using osu.Framework.Bindables; @@ -65,8 +66,7 @@ namespace osu.Game.Storyboards.Drawables [BackgroundDependencyLoader] private void load(IBindable beatmap, TextureStore textureStore) { - var spritePath = Sprite.Path.ToLowerInvariant(); - var path = beatmap.Value.BeatmapSetInfo.Files.Find(f => f.Filename.ToLowerInvariant() == spritePath)?.FileInfo.StoragePath; + var path = beatmap.Value.BeatmapSetInfo.Files.Find(f => f.Filename.Equals(Sprite.Path, StringComparison.InvariantCultureIgnoreCase))?.FileInfo.StoragePath; if (path == null) return; diff --git a/osu.Game/Tests/Visual/AllPlayersTestCase.cs b/osu.Game/Tests/Visual/AllPlayersTestScene.cs similarity index 96% rename from osu.Game/Tests/Visual/AllPlayersTestCase.cs rename to osu.Game/Tests/Visual/AllPlayersTestScene.cs index dc3ef1a85b..454fbe1222 100644 --- a/osu.Game/Tests/Visual/AllPlayersTestCase.cs +++ b/osu.Game/Tests/Visual/AllPlayersTestScene.cs @@ -18,7 +18,7 @@ namespace osu.Game.Tests.Visual /// A base class which runs test for all available rulesets. /// Steps to be run for each ruleset should be added via . /// - public abstract class AllPlayersTestCase : RateAdjustedBeatmapTestCase + public abstract class AllPlayersTestScene : RateAdjustedBeatmapTestScene { protected Player Player; diff --git a/osu.Game/Tests/Visual/EditorClockTestCase.cs b/osu.Game/Tests/Visual/EditorClockTestScene.cs similarity index 95% rename from osu.Game/Tests/Visual/EditorClockTestCase.cs rename to osu.Game/Tests/Visual/EditorClockTestScene.cs index c71c2ae857..58a443ed3d 100644 --- a/osu.Game/Tests/Visual/EditorClockTestCase.cs +++ b/osu.Game/Tests/Visual/EditorClockTestScene.cs @@ -15,12 +15,12 @@ namespace osu.Game.Tests.Visual /// Provides a clock, beat-divisor, and scrolling capability for test cases of editor components that /// are preferrably tested within the presence of a clock and seek controls. /// - public abstract class EditorClockTestCase : OsuTestCase + public abstract class EditorClockTestScene : OsuTestScene { protected readonly BindableBeatDivisor BeatDivisor = new BindableBeatDivisor(); protected new readonly EditorClock Clock; - protected EditorClockTestCase() + protected EditorClockTestScene() { Clock = new EditorClock(new ControlPointInfo(), 5000, BeatDivisor) { IsCoupled = false }; } diff --git a/osu.Game/Tests/Visual/EditorTestCase.cs b/osu.Game/Tests/Visual/EditorTestScene.cs similarity index 87% rename from osu.Game/Tests/Visual/EditorTestCase.cs rename to osu.Game/Tests/Visual/EditorTestScene.cs index 96e70e018e..14c0f0950f 100644 --- a/osu.Game/Tests/Visual/EditorTestCase.cs +++ b/osu.Game/Tests/Visual/EditorTestScene.cs @@ -10,13 +10,13 @@ using osu.Game.Tests.Beatmaps; namespace osu.Game.Tests.Visual { - public abstract class EditorTestCase : ScreenTestCase + public abstract class EditorTestScene : ScreenTestScene { public override IReadOnlyList RequiredTypes => new[] { typeof(Editor), typeof(EditorScreen) }; private readonly Ruleset ruleset; - protected EditorTestCase(Ruleset ruleset) + protected EditorTestScene(Ruleset ruleset) { this.ruleset = ruleset; } diff --git a/osu.Game/Tests/Visual/ManualInputManagerTestCase.cs b/osu.Game/Tests/Visual/ManualInputManagerTestScene.cs similarity index 89% rename from osu.Game/Tests/Visual/ManualInputManagerTestCase.cs rename to osu.Game/Tests/Visual/ManualInputManagerTestScene.cs index 9b1ccdd6a4..a7a7f88ff7 100644 --- a/osu.Game/Tests/Visual/ManualInputManagerTestCase.cs +++ b/osu.Game/Tests/Visual/ManualInputManagerTestScene.cs @@ -8,14 +8,14 @@ using osu.Game.Graphics.Cursor; namespace osu.Game.Tests.Visual { - public abstract class ManualInputManagerTestCase : OsuTestCase + public abstract class ManualInputManagerTestScene : OsuTestScene { protected override Container Content => content; private readonly Container content; protected readonly ManualInputManager InputManager; - protected ManualInputManagerTestCase() + protected ManualInputManagerTestScene() { base.Content.Add(InputManager = new ManualInputManager { diff --git a/osu.Game/Tests/Visual/MultiplayerTestCase.cs b/osu.Game/Tests/Visual/MultiplayerTestScene.cs similarity index 93% rename from osu.Game/Tests/Visual/MultiplayerTestCase.cs rename to osu.Game/Tests/Visual/MultiplayerTestScene.cs index bb866cf750..ffb431b4d3 100644 --- a/osu.Game/Tests/Visual/MultiplayerTestCase.cs +++ b/osu.Game/Tests/Visual/MultiplayerTestScene.cs @@ -7,7 +7,7 @@ using osu.Game.Online.Multiplayer; namespace osu.Game.Tests.Visual { - public abstract class MultiplayerTestCase : ScreenTestCase + public abstract class MultiplayerTestScene : ScreenTestScene { [Cached] private readonly Bindable currentRoom = new Bindable(new Room()); diff --git a/osu.Game/Tests/Visual/OsuTestCase.cs b/osu.Game/Tests/Visual/OsuTestScene.cs similarity index 85% rename from osu.Game/Tests/Visual/OsuTestCase.cs rename to osu.Game/Tests/Visual/OsuTestScene.cs index 1f475209a4..9b775fd498 100644 --- a/osu.Game/Tests/Visual/OsuTestCase.cs +++ b/osu.Game/Tests/Visual/OsuTestScene.cs @@ -15,7 +15,7 @@ using osu.Game.Rulesets.Mods; namespace osu.Game.Tests.Visual { - public abstract class OsuTestCase : TestCase + public abstract class OsuTestScene : TestScene { [Cached(typeof(Bindable))] [Cached(typeof(IBindable))] @@ -44,7 +44,7 @@ namespace osu.Game.Tests.Visual return Dependencies = new DependencyContainer(base.CreateChildDependencies(parent)); } - protected OsuTestCase() + protected OsuTestScene() { localStorage = new Lazy(() => new NativeStorage($"{GetType().Name}-{Guid.NewGuid()}")); } @@ -76,21 +76,21 @@ namespace osu.Game.Tests.Visual } } - protected override ITestCaseTestRunner CreateRunner() => new OsuTestCaseTestRunner(); + protected override ITestSceneTestRunner CreateRunner() => new OsuTestSceneTestRunner(); - public class OsuTestCaseTestRunner : OsuGameBase, ITestCaseTestRunner + public class OsuTestSceneTestRunner : OsuGameBase, ITestSceneTestRunner { - private TestCaseTestRunner.TestRunner runner; + private TestSceneTestRunner.TestRunner runner; protected override void LoadAsyncComplete() { // this has to be run here rather than LoadComplete because - // TestCase.cs is checking the IsLoaded state (on another thread) and expects + // TestScene.cs is checking the IsLoaded state (on another thread) and expects // the runner to be loaded at that point. - Add(runner = new TestCaseTestRunner.TestRunner()); + Add(runner = new TestSceneTestRunner.TestRunner()); } - public void RunTestBlocking(TestCase test) => runner.RunTestBlocking(test); + public void RunTestBlocking(TestScene test) => runner.RunTestBlocking(test); } private class OsuTestBeatmap : BindableBeatmap diff --git a/osu.Game/Tests/Visual/PlacementBlueprintTestCase.cs b/osu.Game/Tests/Visual/PlacementBlueprintTestScene.cs similarity index 93% rename from osu.Game/Tests/Visual/PlacementBlueprintTestCase.cs rename to osu.Game/Tests/Visual/PlacementBlueprintTestScene.cs index ec4b0a1f62..c1561ffea1 100644 --- a/osu.Game/Tests/Visual/PlacementBlueprintTestCase.cs +++ b/osu.Game/Tests/Visual/PlacementBlueprintTestScene.cs @@ -13,12 +13,12 @@ using osu.Game.Screens.Edit.Compose; namespace osu.Game.Tests.Visual { [Cached(Type = typeof(IPlacementHandler))] - public abstract class PlacementBlueprintTestCase : OsuTestCase, IPlacementHandler + public abstract class PlacementBlueprintTestScene : OsuTestScene, IPlacementHandler { protected readonly Container HitObjectContainer; private PlacementBlueprint currentBlueprint; - protected PlacementBlueprintTestCase() + protected PlacementBlueprintTestScene() { Beatmap.Value.BeatmapInfo.BaseDifficulty.CircleSize = 2; diff --git a/osu.Game/Tests/Visual/PlayerTestCase.cs b/osu.Game/Tests/Visual/PlayerTestScene.cs similarity index 93% rename from osu.Game/Tests/Visual/PlayerTestCase.cs rename to osu.Game/Tests/Visual/PlayerTestScene.cs index 5e453f0ac8..0c39194088 100644 --- a/osu.Game/Tests/Visual/PlayerTestCase.cs +++ b/osu.Game/Tests/Visual/PlayerTestScene.cs @@ -13,13 +13,13 @@ using osu.Game.Tests.Beatmaps; namespace osu.Game.Tests.Visual { - public abstract class PlayerTestCase : RateAdjustedBeatmapTestCase + public abstract class PlayerTestScene : RateAdjustedBeatmapTestScene { private readonly Ruleset ruleset; protected Player Player; - protected PlayerTestCase(Ruleset ruleset) + protected PlayerTestScene(Ruleset ruleset) { this.ruleset = ruleset; } diff --git a/osu.Game/Tests/Visual/RateAdjustedBeatmapTestCase.cs b/osu.Game/Tests/Visual/RateAdjustedBeatmapTestScene.cs similarity index 88% rename from osu.Game/Tests/Visual/RateAdjustedBeatmapTestCase.cs rename to osu.Game/Tests/Visual/RateAdjustedBeatmapTestScene.cs index 3b3adb4d76..921a1d9789 100644 --- a/osu.Game/Tests/Visual/RateAdjustedBeatmapTestCase.cs +++ b/osu.Game/Tests/Visual/RateAdjustedBeatmapTestScene.cs @@ -6,7 +6,7 @@ namespace osu.Game.Tests.Visual /// /// Test case which adjusts the beatmap's rate to match any speed adjustments in visual tests. /// - public abstract class RateAdjustedBeatmapTestCase : ScreenTestCase + public abstract class RateAdjustedBeatmapTestScene : ScreenTestScene { protected override void Update() { diff --git a/osu.Game/Tests/Visual/ScreenTestCase.cs b/osu.Game/Tests/Visual/ScreenTestScene.cs similarity index 90% rename from osu.Game/Tests/Visual/ScreenTestCase.cs rename to osu.Game/Tests/Visual/ScreenTestScene.cs index 4fd4c7c207..23f45e0d0f 100644 --- a/osu.Game/Tests/Visual/ScreenTestCase.cs +++ b/osu.Game/Tests/Visual/ScreenTestScene.cs @@ -10,7 +10,7 @@ namespace osu.Game.Tests.Visual /// /// A test case which can be used to test a screen (that relies on OnEntering being called to execute startup instructions). /// - public abstract class ScreenTestCase : ManualInputManagerTestCase + public abstract class ScreenTestScene : ManualInputManagerTestScene { private readonly OsuScreenStack stack; @@ -18,7 +18,7 @@ namespace osu.Game.Tests.Visual protected override Container Content => content; - protected ScreenTestCase() + protected ScreenTestScene() { base.Content.AddRange(new Drawable[] { diff --git a/osu.Game/Tests/Visual/SelectionBlueprintTestCase.cs b/osu.Game/Tests/Visual/SelectionBlueprintTestScene.cs similarity index 92% rename from osu.Game/Tests/Visual/SelectionBlueprintTestCase.cs rename to osu.Game/Tests/Visual/SelectionBlueprintTestScene.cs index d17f670a2d..df3af2cc43 100644 --- a/osu.Game/Tests/Visual/SelectionBlueprintTestCase.cs +++ b/osu.Game/Tests/Visual/SelectionBlueprintTestScene.cs @@ -10,14 +10,14 @@ using osu.Game.Rulesets.Edit; namespace osu.Game.Tests.Visual { - public abstract class SelectionBlueprintTestCase : OsuTestCase + public abstract class SelectionBlueprintTestScene : OsuTestScene { private SelectionBlueprint blueprint; protected override Container Content => content ?? base.Content; private readonly Container content; - protected SelectionBlueprintTestCase() + protected SelectionBlueprintTestScene() { base.Content.Add(content = new Container { diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 8f733a5c55..66d298f8c1 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -15,7 +15,7 @@ - + diff --git a/osu.iOS.props b/osu.iOS.props index e5b4d61615..ccec475d98 100644 --- a/osu.iOS.props +++ b/osu.iOS.props @@ -105,8 +105,8 @@ - - + + diff --git a/osu.iOS/Application.cs b/osu.iOS/Application.cs index cb75e5c159..30e0e15ad1 100644 --- a/osu.iOS/Application.cs +++ b/osu.iOS/Application.cs @@ -9,7 +9,7 @@ namespace osu.iOS { public static void Main(string[] args) { - UIApplication.Main(args, null, "AppDelegate"); + UIApplication.Main(args, "GameUIApplication", "AppDelegate"); } } }