mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Merge remote-tracking branch 'upstream/master' into resume-cursor-2
This commit is contained in:
@ -255,7 +255,8 @@ namespace osu.Game.Tests.Visual.Background
|
||||
{
|
||||
setupUserSettings();
|
||||
|
||||
AddStep("Start player loader", () => songSelect.Push(playerLoader = new TestPlayerLoader(player = new TestPlayer { AllowPause = allowPause, })));
|
||||
AddStep("Start player loader", () => songSelect.Push(playerLoader = new TestPlayerLoader(player = new TestPlayer(allowPause))));
|
||||
|
||||
AddUntilStep("Wait for Player Loader to load", () => playerLoader.IsLoaded);
|
||||
AddStep("Move mouse to center of screen", () => InputManager.MoveMouseTo(playerLoader.ScreenPos));
|
||||
AddUntilStep("Wait for player to load", () => player.IsLoaded);
|
||||
@ -350,6 +351,11 @@ namespace osu.Game.Tests.Visual.Background
|
||||
public readonly Bindable<bool> ReplacesBackground = new Bindable<bool>();
|
||||
public readonly Bindable<bool> IsPaused = new Bindable<bool>();
|
||||
|
||||
public TestPlayer(bool allowPause = true)
|
||||
: base(allowPause)
|
||||
{
|
||||
}
|
||||
|
||||
public bool IsStoryboardVisible() => ((TestUserDimContainer)CurrentStoryboardContainer).CurrentAlpha == 1;
|
||||
|
||||
public bool IsStoryboardInvisible() => ((TestUserDimContainer)CurrentStoryboardContainer).CurrentAlpha <= 1;
|
||||
|
@ -15,12 +15,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
protected override Player CreatePlayer(Ruleset ruleset)
|
||||
{
|
||||
Beatmap.Value.Mods.Value = Beatmap.Value.Mods.Value.Concat(new[] { ruleset.GetAutoplayMod() });
|
||||
return new ScoreAccessiblePlayer
|
||||
{
|
||||
AllowPause = false,
|
||||
AllowLeadIn = false,
|
||||
AllowResults = false,
|
||||
};
|
||||
return new ScoreAccessiblePlayer();
|
||||
}
|
||||
|
||||
protected override void AddCheckSteps()
|
||||
@ -33,6 +28,11 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
public new ScoreProcessor ScoreProcessor => base.ScoreProcessor;
|
||||
public new HUDOverlay HUDOverlay => base.HUDOverlay;
|
||||
|
||||
public ScoreAccessiblePlayer()
|
||||
: base(false, false)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,12 +26,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
Beatmap.Value = new DummyWorkingBeatmap(game);
|
||||
|
||||
AddStep("load dummy beatmap", () => stack.Push(loader = new PlayerLoader(() => new Player
|
||||
{
|
||||
AllowPause = false,
|
||||
AllowLeadIn = false,
|
||||
AllowResults = false,
|
||||
})));
|
||||
AddStep("load dummy beatmap", () => stack.Push(loader = new PlayerLoader(() => new Player(false, false))));
|
||||
|
||||
AddUntilStep("wait for current", () => loader.IsCurrentScreen());
|
||||
|
||||
@ -47,12 +42,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
SlowLoadPlayer slow = null;
|
||||
|
||||
stack.Push(loader = new PlayerLoader(() => slow = new SlowLoadPlayer
|
||||
{
|
||||
AllowPause = false,
|
||||
AllowLeadIn = false,
|
||||
AllowResults = false,
|
||||
}));
|
||||
stack.Push(loader = new PlayerLoader(() => slow = new SlowLoadPlayer(false, false)));
|
||||
|
||||
Scheduler.AddDelayed(() => slow.Ready = true, 5000);
|
||||
});
|
||||
@ -64,6 +54,11 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
public bool Ready;
|
||||
|
||||
public SlowLoadPlayer(bool allowPause = true, bool showResults = true)
|
||||
: base(allowPause, showResults)
|
||||
{
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
|
@ -9,7 +9,6 @@ using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Overlays.BeatmapSet.Scores;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
@ -44,9 +43,9 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
}
|
||||
};
|
||||
|
||||
IEnumerable<APIScoreInfo> scores = new[]
|
||||
IEnumerable<ScoreInfo> scores = new[]
|
||||
{
|
||||
new APIScoreInfo
|
||||
new ScoreInfo
|
||||
{
|
||||
User = new User
|
||||
{
|
||||
@ -69,7 +68,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
TotalScore = 1234567890,
|
||||
Accuracy = 1,
|
||||
},
|
||||
new APIScoreInfo
|
||||
new ScoreInfo
|
||||
{
|
||||
User = new User
|
||||
{
|
||||
@ -91,7 +90,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
TotalScore = 1234789,
|
||||
Accuracy = 0.9997,
|
||||
},
|
||||
new APIScoreInfo
|
||||
new ScoreInfo
|
||||
{
|
||||
User = new User
|
||||
{
|
||||
@ -112,7 +111,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
TotalScore = 12345678,
|
||||
Accuracy = 0.9854,
|
||||
},
|
||||
new APIScoreInfo
|
||||
new ScoreInfo
|
||||
{
|
||||
User = new User
|
||||
{
|
||||
@ -132,7 +131,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
TotalScore = 1234567,
|
||||
Accuracy = 0.8765,
|
||||
},
|
||||
new APIScoreInfo
|
||||
new ScoreInfo
|
||||
{
|
||||
User = new User
|
||||
{
|
||||
@ -157,9 +156,9 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
s.Statistics.Add(HitResult.Meh, RNG.Next(2000));
|
||||
}
|
||||
|
||||
IEnumerable<APIScoreInfo> anotherScores = new[]
|
||||
IEnumerable<ScoreInfo> anotherScores = new[]
|
||||
{
|
||||
new APIScoreInfo
|
||||
new ScoreInfo
|
||||
{
|
||||
User = new User
|
||||
{
|
||||
@ -181,7 +180,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
TotalScore = 1234789,
|
||||
Accuracy = 0.9997,
|
||||
},
|
||||
new APIScoreInfo
|
||||
new ScoreInfo
|
||||
{
|
||||
User = new User
|
||||
{
|
||||
@ -204,7 +203,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
TotalScore = 1234567890,
|
||||
Accuracy = 1,
|
||||
},
|
||||
new APIScoreInfo
|
||||
new ScoreInfo
|
||||
{
|
||||
User = new User
|
||||
{
|
||||
@ -220,7 +219,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
TotalScore = 123456,
|
||||
Accuracy = 0.6543,
|
||||
},
|
||||
new APIScoreInfo
|
||||
new ScoreInfo
|
||||
{
|
||||
User = new User
|
||||
{
|
||||
@ -241,7 +240,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
TotalScore = 12345678,
|
||||
Accuracy = 0.9854,
|
||||
},
|
||||
new APIScoreInfo
|
||||
new ScoreInfo
|
||||
{
|
||||
User = new User
|
||||
{
|
||||
@ -269,7 +268,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
s.Statistics.Add(HitResult.Meh, RNG.Next(2000));
|
||||
}
|
||||
|
||||
var topScoreInfo = new APIScoreInfo
|
||||
var topScoreInfo = new ScoreInfo
|
||||
{
|
||||
User = new User
|
||||
{
|
||||
|
Reference in New Issue
Block a user