mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Merge branch 'master' into multiplayer-spectator-screen
This commit is contained in:
@ -64,6 +64,13 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
});
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
Clock.Seek(2500);
|
||||
}
|
||||
|
||||
public abstract Drawable CreateTestComponent();
|
||||
|
||||
private class AudioVisualiser : CompositeDrawable
|
||||
|
@ -11,6 +11,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Online;
|
||||
using osu.Game.Online.API;
|
||||
@ -38,6 +39,8 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
|
||||
protected override Container<Drawable> Content { get; } = new Container { RelativeSizeAxes = Axes.Both };
|
||||
|
||||
private OsuConfigManager config;
|
||||
|
||||
public TestSceneMultiplayerGameplayLeaderboard()
|
||||
{
|
||||
base.Content.Children = new Drawable[]
|
||||
@ -48,6 +51,12 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Dependencies.Cache(config = new OsuConfigManager(LocalStorage));
|
||||
}
|
||||
|
||||
[SetUpSteps]
|
||||
public override void SetUpSteps()
|
||||
{
|
||||
@ -97,6 +106,14 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
AddRepeatStep("mark user quit", () => Client.CurrentMatchPlayingUserIds.RemoveAt(0), users);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestChangeScoringMode()
|
||||
{
|
||||
AddRepeatStep("update state", () => streamingClient.RandomlyUpdateState(), 5);
|
||||
AddStep("change to classic", () => config.SetValue(OsuSetting.ScoreDisplayMode, ScoringMode.Classic));
|
||||
AddStep("change to standardised", () => config.SetValue(OsuSetting.ScoreDisplayMode, ScoringMode.Standardised));
|
||||
}
|
||||
|
||||
public class TestMultiplayerStreaming : SpectatorStreamingClient
|
||||
{
|
||||
public new BindableList<int> PlayingUsers => (BindableList<int>)base.PlayingUsers;
|
||||
@ -163,7 +180,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
break;
|
||||
}
|
||||
|
||||
((ISpectatorClient)this).UserSentFrames(userId, new FrameDataBundle(header, Array.Empty<LegacyReplayFrame>()));
|
||||
((ISpectatorClient)this).UserSentFrames(userId, new FrameDataBundle(header, new[] { new LegacyReplayFrame(Time.Current, 0, 0, ReplayButtonState.None) }));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
InputManager.Click(MouseButton.Left);
|
||||
});
|
||||
|
||||
AddAssert("match started", () => Client.Room?.State == MultiplayerRoomState.WaitingForLoad);
|
||||
AddUntilStep("match started", () => Client.Room?.State == MultiplayerRoomState.WaitingForLoad);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,13 +19,12 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
UserHistoryGraph graph;
|
||||
|
||||
Add(graph = new UserHistoryGraph
|
||||
Add(graph = new UserHistoryGraph("Test")
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 200,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
TooltipCounterName = "Test"
|
||||
});
|
||||
|
||||
var values = new[]
|
||||
|
Reference in New Issue
Block a user