Merge remote-tracking branch 'upstream/master' into flashlight-dim

This commit is contained in:
David Zhao
2019-05-07 12:04:58 +09:00
196 changed files with 2679 additions and 1463 deletions

View File

@ -7,6 +7,7 @@ using osu.Framework.Graphics.Textures;
using osu.Framework.Timing;
using osu.Game.Beatmaps;
using osu.Game.Rulesets;
using osuTK;
namespace osu.Game.Tests.Beatmaps
{
@ -67,9 +68,10 @@ namespace osu.Game.Tests.Beatmaps
public override bool Seek(double seek)
{
offset = Math.Min(seek, Length);
offset = MathHelper.Clamp(seek, 0, Length);
lastReferenceTime = null;
return true;
return offset == seek;
}
public override void Start()

View File

@ -29,7 +29,7 @@ namespace osu.Game.Tests.Visual
{
Player p = null;
AddStep(r.Name, () => p = loadPlayerFor(r));
AddUntilStep(() =>
AddUntilStep("player loaded", () =>
{
if (p?.IsLoaded == true)
{
@ -38,7 +38,7 @@ namespace osu.Game.Tests.Visual
}
return false;
}, "player loaded");
});
AddCheckSteps();
}

View File

@ -18,7 +18,7 @@ namespace osu.Game.Tests.Visual
public abstract class EditorClockTestCase : OsuTestCase
{
protected readonly BindableBeatDivisor BeatDivisor = new BindableBeatDivisor();
protected readonly EditorClock Clock;
protected new readonly EditorClock Clock;
protected EditorClockTestCase()
{

View File

@ -31,7 +31,7 @@ namespace osu.Game.Tests.Visual
[Cached(Type = typeof(IBindable<IReadOnlyList<Mod>>))]
protected readonly Bindable<IReadOnlyList<Mod>> Mods = new Bindable<IReadOnlyList<Mod>>(Array.Empty<Mod>());
protected DependencyContainer Dependencies { get; private set; }
protected new DependencyContainer Dependencies { get; private set; }
private readonly Lazy<Storage> localStorage;
protected Storage LocalStorage => localStorage.Value;

View File

@ -36,7 +36,7 @@ namespace osu.Game.Tests.Visual
public void SetUpSteps()
{
AddStep(ruleset.RulesetInfo.Name, loadPlayer);
AddUntilStep(() => Player.IsLoaded && Player.Alpha == 1, "player loaded");
AddUntilStep("player loaded", () => Player.IsLoaded && Player.Alpha == 1);
}
protected virtual IBeatmap CreateBeatmap(Ruleset ruleset) => new TestBeatmap(ruleset.RulesetInfo);