mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 15:03:13 +08:00
Merge remote-tracking branch 'upstream/master' into better-player-flags
This commit is contained in:
commit
253b18b92f
@ -92,7 +92,7 @@ namespace osu.Game.Tests.Visual.Background
|
||||
public void PlayerLoaderSettingsHoverTest()
|
||||
{
|
||||
setupUserSettings();
|
||||
AddStep("Start player loader", () => songSelect.Push(playerLoader = new TestPlayerLoader(player = new TestPlayer())));
|
||||
AddStep("Start player loader", () => songSelect.Push(playerLoader = new TestPlayerLoader(player = new TestPlayer { BlockLoad = true })));
|
||||
AddUntilStep("Wait for Player Loader to load", () => playerLoader?.IsLoaded ?? false);
|
||||
AddAssert("Background retained from song select", () => songSelect.IsBackgroundCurrent());
|
||||
AddStep("Trigger background preview", () =>
|
||||
@ -255,13 +255,8 @@ namespace osu.Game.Tests.Visual.Background
|
||||
{
|
||||
setupUserSettings();
|
||||
|
||||
AddStep("Start player loader", () =>
|
||||
{
|
||||
songSelect.Push(playerLoader = new TestPlayerLoader(player = new TestPlayer(allowPause)
|
||||
{
|
||||
Ready = true,
|
||||
}));
|
||||
});
|
||||
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,7 +345,7 @@ namespace osu.Game.Tests.Visual.Background
|
||||
public UserDimContainer CurrentStoryboardContainer => StoryboardContainer;
|
||||
|
||||
// Whether or not the player should be allowed to load.
|
||||
public bool Ready;
|
||||
public bool BlockLoad;
|
||||
|
||||
public Bindable<bool> StoryboardEnabled;
|
||||
public readonly Bindable<bool> ReplacesBackground = new Bindable<bool>();
|
||||
@ -366,10 +361,11 @@ namespace osu.Game.Tests.Visual.Background
|
||||
public bool IsStoryboardInvisible() => ((TestUserDimContainer)CurrentStoryboardContainer).CurrentAlpha <= 1;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
private void load(OsuConfigManager config, CancellationToken token)
|
||||
{
|
||||
while (!Ready)
|
||||
while (BlockLoad && !token.IsCancellationRequested)
|
||||
Thread.Sleep(1);
|
||||
|
||||
StoryboardEnabled = config.GetBindable<bool>(OsuSetting.ShowStoryboard);
|
||||
ReplacesBackground.BindTo(Background.StoryboardReplacesBackground);
|
||||
DrawableRuleset.IsPaused.BindTo(IsPaused);
|
||||
|
@ -14,8 +14,6 @@ namespace osu.Game.Screens.Multi
|
||||
{
|
||||
public override bool DisallowExternalBeatmapRulesetChanges => false;
|
||||
|
||||
public override bool RemoveWhenNotAlive => false;
|
||||
|
||||
public virtual string ShortTitle => Title;
|
||||
|
||||
[Resolved(CanBeNull = true)]
|
||||
|
@ -7,7 +7,6 @@ using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.Timing;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Rulesets;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Tests.Beatmaps
|
||||
{
|
||||
@ -68,7 +67,7 @@ namespace osu.Game.Tests.Beatmaps
|
||||
|
||||
public override bool Seek(double seek)
|
||||
{
|
||||
offset = MathHelper.Clamp(seek, 0, Length);
|
||||
offset = Math.Min(seek, Length);
|
||||
lastReferenceTime = null;
|
||||
return true;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.3" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.128.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.323.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.325.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.23.0" />
|
||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
||||
|
@ -105,8 +105,8 @@
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.128.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.323.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2019.323.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.325.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2019.325.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.22.0" />
|
||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
||||
|
Loading…
Reference in New Issue
Block a user