mirror of
https://github.com/ppy/osu
synced 2025-03-21 10:28:06 +00:00
Merged master into autopilot
This commit is contained in:
commit
7575af6f42
osu.Desktop/Updater
osu.Game.Rulesets.Catch.Tests
TestSceneAutoJuiceStream.csTestSceneBananaShower.csTestSceneCatchPlayer.csTestSceneCatchStacker.csTestSceneCatcherArea.csTestSceneFruitObjects.csTestSceneHyperDash.cs
osu.Game.Rulesets.Catch/Difficulty
osu.Game.Rulesets.Mania.Tests
ManiaInputTestScene.csManiaPlacementBlueprintTestScene.csManiaSelectionBlueprintTestScene.csTestSceneAutoGeneration.csTestSceneColumn.csTestSceneEditor.csTestSceneHoldNotePlacementBlueprint.csTestSceneHoldNoteSelectionBlueprint.csTestSceneNotePlacementBlueprint.csTestSceneNoteSelectionBlueprint.csTestSceneNotes.csTestSceneStage.cs
osu.Game.Rulesets.Osu.Tests
TestSceneEditor.csTestSceneGameplayCursor.csTestSceneHitCircle.csTestSceneHitCircleHidden.csTestSceneHitCircleLongCombo.csTestSceneHitCirclePlacementBlueprint.csTestSceneHitCircleSelectionBlueprint.csTestSceneOsuFlashlight.csTestSceneOsuPlayer.csTestSceneResumeOverlay.csTestSceneShaking.csTestSceneSlider.csTestSceneSliderHidden.csTestSceneSliderInput.csTestSceneSliderPlacementBlueprint.csTestSceneSliderSelectionBlueprint.csTestSceneSpinner.csTestSceneSpinnerHidden.csTestSceneSpinnerPlacementBlueprint.csTestSceneSpinnerSelectionBlueprint.cs
osu.Game.Rulesets.Osu
osu.Game.Rulesets.Taiko.Tests
osu.Game.Tests
Beatmaps/Formats
Chat
Resources
Visual
Background
Components
Editor
TestSceneBeatDivisorControl.csTestSceneEditorCompose.csTestSceneEditorComposeRadioButtons.csTestSceneEditorComposeTimeline.csTestSceneEditorMenuBar.csTestSceneEditorSeekSnapping.csTestSceneEditorSummaryTimeline.csTestSceneHitObjectComposer.csTestScenePlaybackControl.csTestSceneWaveContainer.csTestSceneWaveform.csTestSceneZoomableScrollContainer.cs
Gameplay
TestSceneAutoplay.csTestSceneBreakOverlay.csTestSceneFrameStabilityContainer.csTestSceneGameplayMenuOverlay.csTestSceneHoldForMenuButton.csTestSceneKeyCounter.csTestSceneMedalOverlay.csTestScenePause.csTestScenePlayerLoader.csTestScenePlayerReferenceLeaking.csTestSceneReplay.csTestSceneReplaySettingsOverlay.csTestSceneResults.csTestSceneScoreCounter.csTestSceneScrollingHitObjects.csTestSceneSkinReloadable.csTestSceneSkipOverlay.csTestSceneSongProgress.csTestSceneStoryboard.cs
Menus
Multiplayer
@ -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()
|
||||
|
@ -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())
|
||||
{
|
||||
}
|
@ -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<Type> RequiredTypes => new[]
|
||||
{
|
||||
@ -24,7 +24,7 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
typeof(DrawableCatchRuleset),
|
||||
};
|
||||
|
||||
public TestCaseBananaShower()
|
||||
public TestSceneBananaShower()
|
||||
: base(new CatchRuleset())
|
||||
{
|
||||
}
|
@ -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())
|
||||
{
|
||||
}
|
@ -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())
|
||||
{
|
||||
}
|
@ -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<float>("CircleSize", 0, 8, 5, createCatcher);
|
||||
AddToggleStep("Hyperdash", t => catcherArea.ToggleHyperDash(t));
|
@ -15,7 +15,7 @@ using osuTK;
|
||||
namespace osu.Game.Rulesets.Catch.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestCaseFruitObjects : OsuTestCase
|
||||
public class TestSceneFruitObjects : OsuTestScene
|
||||
{
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
{
|
||||
@ -29,7 +29,7 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
typeof(Pulp),
|
||||
};
|
||||
|
||||
public TestCaseFruitObjects()
|
||||
public TestSceneFruitObjects()
|
||||
{
|
||||
Add(new GridContainer
|
||||
{
|
@ -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())
|
||||
{
|
||||
}
|
@ -57,33 +57,20 @@ namespace osu.Game.Rulesets.Catch.Difficulty
|
||||
|
||||
CatchHitObject lastObject = null;
|
||||
|
||||
foreach (var hitObject in beatmap.HitObjects.OfType<CatchHitObject>())
|
||||
// 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<CatchHitObject>()
|
||||
.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<CatchHitObject>().Where(o => !(o is TinyDroplet)))
|
||||
{
|
||||
yield return new CatchDifficultyHitObject(nested, lastObject, clockRate, halfCatchWidth);
|
||||
|
||||
lastObject = nested;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
lastObject = hitObject;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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<Drawable> content;
|
||||
protected override Container<Drawable> Content => content ?? base.Content;
|
||||
|
||||
protected ManiaInputTestCase(int keys)
|
||||
protected ManiaInputTestScene(int keys)
|
||||
{
|
||||
base.Content.Add(content = new LocalInputManager(keys));
|
||||
}
|
@ -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<Mod>))]
|
||||
private IReadOnlyList<Mod> mods { get; set; } = Array.Empty<Mod>();
|
||||
|
||||
protected ManiaPlacementBlueprintTestCase()
|
||||
protected ManiaPlacementBlueprintTestScene()
|
||||
{
|
||||
Add(column = new Column(0)
|
||||
{
|
@ -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)
|
||||
{
|
@ -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()
|
@ -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<Type> RequiredTypes => new[]
|
||||
{
|
||||
@ -37,7 +37,7 @@ namespace osu.Game.Rulesets.Mania.Tests
|
||||
|
||||
private readonly List<Column> columns = new List<Column>();
|
||||
|
||||
public TestCaseColumn()
|
||||
public TestSceneColumn()
|
||||
: base(2)
|
||||
{
|
||||
}
|
@ -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<ManiaScrollingDirection> direction = new Bindable<ManiaScrollingDirection>();
|
||||
|
||||
public TestCaseEditor()
|
||||
public TestSceneEditor()
|
||||
: base(new ManiaRuleset())
|
||||
{
|
||||
AddStep("upwards scroll", () => direction.Value = ManiaScrollingDirection.Up);
|
@ -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();
|
@ -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<Drawable> 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());
|
@ -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();
|
@ -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<Drawable> Content => content ?? base.Content;
|
||||
private readonly Container content;
|
||||
|
||||
public TestCaseNoteSelectionBlueprint()
|
||||
public TestSceneNoteSelectionBlueprint()
|
||||
{
|
||||
var note = new Note { Column = 0 };
|
||||
note.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
|
@ -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<Type> RequiredTypes => new[]
|
||||
{
|
@ -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<ScrollingTestContainer> fill;
|
||||
|
||||
public TestCaseStage()
|
||||
public TestSceneStage()
|
||||
: base(columns)
|
||||
{
|
||||
}
|
@ -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())
|
||||
{
|
||||
}
|
@ -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;
|
||||
|
@ -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<Type> 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 }));
|
||||
|
@ -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<Type> RequiredTypes => base.RequiredTypes.Concat(new[] { typeof(OsuModHidden) }).ToList();
|
||||
|
||||
public TestCaseHitCircleHidden()
|
||||
public TestSceneHitCircleHidden()
|
||||
{
|
||||
Mods.Value = new[] { new OsuModHidden() };
|
||||
}
|
@ -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())
|
||||
{
|
||||
}
|
@ -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();
|
@ -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 });
|
@ -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)
|
||||
{
|
@ -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())
|
||||
{
|
||||
}
|
@ -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<Type> RequiredTypes => new[]
|
||||
{
|
||||
typeof(OsuResumeOverlay),
|
||||
};
|
||||
|
||||
public TestCaseResumeOverlay()
|
||||
public TestSceneResumeOverlay()
|
||||
{
|
||||
ManualOsuInputManager osuInputManager;
|
||||
CursorContainer cursor;
|
@ -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)
|
||||
{
|
@ -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<Type> 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 }));
|
||||
|
@ -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<Type> RequiredTypes => base.RequiredTypes.Concat(new[] { typeof(OsuModHidden) }).ToList();
|
||||
|
||||
public TestCaseSliderHidden()
|
||||
public TestSceneSliderHidden()
|
||||
{
|
||||
Mods.Value = new[] { new OsuModHidden() };
|
||||
}
|
@ -26,7 +26,7 @@ using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Tests
|
||||
{
|
||||
public class TestCaseSliderInput : RateAdjustedBeatmapTestCase
|
||||
public class TestSceneSliderInput : RateAdjustedBeatmapTestScene
|
||||
{
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
{
|
@ -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();
|
@ -17,7 +17,7 @@ using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Tests
|
||||
{
|
||||
public class TestCaseSliderSelectionBlueprint : SelectionBlueprintTestCase
|
||||
public class TestSceneSliderSelectionBlueprint : SelectionBlueprintTestScene
|
||||
{
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
{
|
||||
@ -31,7 +31,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
|
||||
private readonly DrawableSlider drawableObject;
|
||||
|
||||
public TestCaseSliderSelectionBlueprint()
|
||||
public TestSceneSliderSelectionBlueprint()
|
||||
{
|
||||
var slider = new Slider
|
||||
{
|
@ -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<Type> 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 }));
|
||||
|
@ -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<Type> RequiredTypes => base.RequiredTypes.Concat(new[] { typeof(OsuModHidden) }).ToList();
|
||||
|
||||
public TestCaseSpinnerHidden()
|
||||
public TestSceneSpinnerHidden()
|
||||
{
|
||||
Mods.Value = new[] { new OsuModHidden() };
|
||||
}
|
@ -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);
|
||||
|
@ -17,7 +17,7 @@ using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Tests
|
||||
{
|
||||
public class TestCaseSpinnerSelectionBlueprint : SelectionBlueprintTestCase
|
||||
public class TestSceneSpinnerSelectionBlueprint : SelectionBlueprintTestScene
|
||||
{
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
{
|
||||
@ -27,7 +27,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
|
||||
private readonly DrawableSpinner drawableSpinner;
|
||||
|
||||
public TestCaseSpinnerSelectionBlueprint()
|
||||
public TestSceneSpinnerSelectionBlueprint()
|
||||
{
|
||||
var spinner = new Spinner
|
||||
{
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -160,6 +160,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
{
|
||||
base.SkinChanged(skin, allowFallback);
|
||||
|
||||
Body.BorderSize = skin.GetValue<SkinConfiguration, float?>(s => s.SliderBorderSize) ?? SliderBody.DEFAULT_BORDER_SIZE;
|
||||
Body.AccentColour = skin.GetValue<SkinConfiguration, Color4?>(s => s.CustomColours.ContainsKey("SliderTrackOverride") ? s.CustomColours["SliderTrackOverride"] : (Color4?)null) ?? AccentColour;
|
||||
Body.BorderColour = skin.GetValue<SkinConfiguration, Color4?>(s => s.CustomColours.ContainsKey("SliderBorder") ? s.CustomColours["SliderBorder"] : (Color4?)null) ?? Color4.White;
|
||||
Ball.AccentColour = skin.GetValue<SkinConfiguration, Color4?>(s => s.CustomColours.ContainsKey("SliderBall") ? s.CustomColours["SliderBall"] : (Color4?)null) ?? AccentColour;
|
||||
|
@ -14,6 +14,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
public abstract class SliderBody : CompositeDrawable
|
||||
{
|
||||
public const float DEFAULT_BORDER_SIZE = 1;
|
||||
|
||||
private readonly SliderPath path;
|
||||
protected Path Path => path;
|
||||
|
||||
@ -64,6 +66,23 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Used to size the path border.
|
||||
/// </summary>
|
||||
public float BorderSize
|
||||
{
|
||||
get => path.BorderSize;
|
||||
set
|
||||
{
|
||||
if (path.BorderSize == value)
|
||||
return;
|
||||
|
||||
path.BorderSize = value;
|
||||
|
||||
container.ForceRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
public Quad PathDrawQuad => container.ScreenSpaceDrawQuad;
|
||||
|
||||
protected SliderBody()
|
||||
@ -92,6 +111,9 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
|
||||
private class SliderPath : SmoothPath
|
||||
{
|
||||
private const float border_max_size = 8f;
|
||||
private const float border_min_size = 0f;
|
||||
|
||||
private const float border_portion = 0.128f;
|
||||
private const float gradient_portion = 1 - border_portion;
|
||||
|
||||
@ -130,12 +152,33 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
}
|
||||
}
|
||||
|
||||
private float borderSize = DEFAULT_BORDER_SIZE;
|
||||
|
||||
public float BorderSize
|
||||
{
|
||||
get => borderSize;
|
||||
set
|
||||
{
|
||||
if (borderSize == value)
|
||||
return;
|
||||
|
||||
if (value < border_min_size || value > border_max_size)
|
||||
return;
|
||||
|
||||
borderSize = value;
|
||||
|
||||
InvalidateTexture();
|
||||
}
|
||||
}
|
||||
|
||||
private float calculatedBorderPortion => BorderSize * border_portion;
|
||||
|
||||
protected override Color4 ColourAt(float position)
|
||||
{
|
||||
if (position <= border_portion)
|
||||
if (calculatedBorderPortion != 0f && position <= calculatedBorderPortion)
|
||||
return BorderColour;
|
||||
|
||||
position -= border_portion;
|
||||
position -= calculatedBorderPortion;
|
||||
return new Color4(AccentColour.R, AccentColour.G, AccentColour.B, (opacity_at_edge - (opacity_at_edge - opacity_at_centre) * position / gradient_portion) * AccentColour.A);
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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<Type> 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 })
|
||||
{
|
@ -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;
|
56
osu.Game.Tests/Beatmaps/Formats/LegacyDecoderTest.cs
Normal file
56
osu.Game.Tests/Beatmaps/Formats/LegacyDecoderTest.cs
Normal file
@ -0,0 +1,56 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. 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<TestModel>
|
||||
{
|
||||
public readonly List<string> ParsedLines = new List<string>();
|
||||
|
||||
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
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -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" });
|
||||
|
||||
|
9
osu.Game.Tests/Resources/comments.osu
Normal file
9
osu.Game.Tests/Resources/comments.osu
Normal file
@ -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
|
@ -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<Type> RequiredTypes => new[]
|
||||
{
|
@ -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[]
|
||||
{
|
@ -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;
|
@ -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();
|
||||
|
@ -11,7 +11,7 @@ using osuTK;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Editor
|
||||
{
|
||||
public class TestCaseBeatDivisorControl : OsuTestCase
|
||||
public class TestSceneBeatDivisorControl : OsuTestScene
|
||||
{
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(BindableBeatDivisor) };
|
||||
|
@ -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<Type> RequiredTypes => new[] { typeof(ComposeScreen) };
|
||||
|
@ -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<Type> RequiredTypes => new[] { typeof(DrawableRadioButton) };
|
||||
|
||||
public TestCaseEditorComposeRadioButtons()
|
||||
public TestSceneEditorComposeRadioButtons()
|
||||
{
|
||||
RadioButtonCollection collection;
|
||||
Add(collection = new RadioButtonCollection
|
@ -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<Type> RequiredTypes => new[]
|
||||
{
|
@ -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<Type> RequiredTypes => new[] { typeof(EditorMenuBar), typeof(ScreenSelectionTabControl) };
|
||||
|
||||
public TestCaseEditorMenuBar()
|
||||
public TestSceneEditorMenuBar()
|
||||
{
|
||||
Add(new Container
|
||||
{
|
@ -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;
|
||||
}
|
@ -14,7 +14,7 @@ using osuTK;
|
||||
namespace osu.Game.Tests.Visual.Editor
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestCaseEditorSummaryTimeline : EditorClockTestCase
|
||||
public class TestSceneEditorSummaryTimeline : EditorClockTestScene
|
||||
{
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(SummaryTimeline) };
|
||||
|
@ -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<Type> RequiredTypes => new[]
|
||||
{
|
@ -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()
|
@ -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)
|
@ -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;
|
||||
|
@ -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;
|
@ -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)
|
||||
{
|
@ -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);
|
||||
|
@ -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
|
||||
{
|
@ -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<Type> RequiredTypes => new[] { typeof(FailOverlay), typeof(PauseOverlay) };
|
||||
|
@ -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;
|
||||
|
@ -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<Type> RequiredTypes => new[]
|
||||
{
|
||||
@ -23,7 +23,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
typeof(KeyCounterDisplay)
|
||||
};
|
||||
|
||||
public TestCaseKeyCounter()
|
||||
public TestSceneKeyCounter()
|
||||
{
|
||||
KeyCounterKeyboard rewindTestKeyCounterKeyboard;
|
||||
KeyCounterDisplay kc = new KeyCounterDisplay
|
@ -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<Type> RequiredTypes => new[]
|
||||
{
|
||||
@ -19,7 +19,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
typeof(DrawableMedal),
|
||||
};
|
||||
|
||||
public TestCaseMedalOverlay()
|
||||
public TestSceneMedalOverlay()
|
||||
{
|
||||
AddStep(@"display", () =>
|
||||
{
|
@ -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<Drawable> 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);
|
@ -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;
|
@ -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<WorkingBeatmap> workingWeakReferences = new WeakList<WorkingBeatmap>();
|
||||
|
@ -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)
|
||||
{
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -21,7 +21,7 @@ using osuTK;
|
||||
namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestCaseScrollingHitObjects : OsuTestCase
|
||||
public class TestSceneScrollingHitObjects : OsuTestScene
|
||||
{
|
||||
public override IReadOnlyList<Type> 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
|
||||
{
|
@ -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()
|
@ -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()
|
||||
{
|
@ -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);
|
||||
|
@ -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<DrawableStoryboard> storyboardContainer;
|
||||
private DrawableStoryboard storyboard;
|
||||
|
||||
public TestCaseStoryboard()
|
||||
public TestSceneStoryboard()
|
||||
{
|
||||
Clock = new FramedClock();
|
||||
|
@ -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();
|
@ -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<Type> RequiredTypes => new[]
|
||||
{
|
||||
typeof(OsuLogo),
|
||||
};
|
||||
|
||||
public TestCaseIntroSequence()
|
||||
public TestSceneIntroSequence()
|
||||
{
|
||||
OsuLogo logo;
|
||||
|
@ -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;
|
@ -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<Type> 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;
|
@ -16,7 +16,7 @@ using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
{
|
||||
public class TestCaseLoungeRoomsContainer : MultiplayerTestCase
|
||||
public class TestSceneLoungeRoomsContainer : MultiplayerTestScene
|
||||
{
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
{
|
@ -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<Type> RequiredTypes => new[]
|
||||
{
|
||||
typeof(Header)
|
||||
};
|
||||
|
||||
public TestCaseMatchHeader()
|
||||
public TestSceneMatchHeader()
|
||||
{
|
||||
Room.Playlist.Add(new PlaylistItem
|
||||
{
|
@ -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<Type> RequiredTypes => new[]
|
||||
{
|
||||
@ -19,7 +19,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
|
||||
private readonly Bindable<User> host = new Bindable<User>(new User { Username = "SomeHost" });
|
||||
|
||||
public TestCaseMatchHostInfo()
|
||||
public TestSceneMatchHostInfo()
|
||||
{
|
||||
HostInfo hostInfo;
|
||||
|
@ -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<Type> RequiredTypes => new[]
|
||||
{
|
@ -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;
|
||||
|
@ -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 });
|
||||
|
@ -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<Type> RequiredTypes => new[]
|
||||
{
|
@ -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<Type> RequiredTypes => new[]
|
||||
{
|
@ -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;
|
||||
|
@ -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<Type> 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();
|
||||
|
@ -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<Type> RequiredTypes => new[]
|
||||
{
|
||||
@ -20,7 +20,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
typeof(RoomStatusPlaying)
|
||||
};
|
||||
|
||||
public TestCaseRoomStatus()
|
||||
public TestSceneRoomStatus()
|
||||
{
|
||||
Child = new FillFlowContainer
|
||||
{
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user