Split MatchSubScreen into abstract component + timeshift implementation

This commit is contained in:
smoogipoo
2020-12-20 23:40:19 +09:00
parent b9e4a7196e
commit a1ba4b6979
6 changed files with 97 additions and 87 deletions

View File

@ -16,15 +16,15 @@ using osu.Game.Online.Multiplayer;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Osu;
using osu.Game.Screens.Multi;
using osu.Game.Screens.Multi.Match;
using osu.Game.Screens.Multi.Match.Components;
using osu.Game.Screens.Multi.Timeshift;
using osu.Game.Tests.Beatmaps;
using osu.Game.Users;
using osuTK.Input;
namespace osu.Game.Tests.Visual.Multiplayer
{
public class TestSceneMatchSubScreen : MultiplayerTestScene
public class TestSceneTimeshiftRoomSubScreen : MultiplayerTestScene
{
protected override bool UseOnlineAPI => true;
@ -34,7 +34,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
private BeatmapManager manager;
private RulesetStore rulesets;
private TestMatchSubScreen match;
private TestTimeshiftRoomSubScreen match;
[BackgroundDependencyLoader]
private void load(GameHost host, AudioManager audio)
@ -48,7 +48,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
[SetUpSteps]
public void SetupSteps()
{
AddStep("load match", () => LoadScreen(match = new TestMatchSubScreen(Room)));
AddStep("load match", () => LoadScreen(match = new TestTimeshiftRoomSubScreen(Room)));
AddUntilStep("wait for load", () => match.IsCurrentScreen());
}
@ -131,13 +131,13 @@ namespace osu.Game.Tests.Visual.Multiplayer
AddAssert("match has original beatmap", () => match.Beatmap.Value.Beatmap.BeatmapInfo.BaseDifficulty.CircleSize != 1);
}
private class TestMatchSubScreen : MatchSubScreen
private class TestTimeshiftRoomSubScreen : TimeshiftRoomSubScreen
{
public new Bindable<PlaylistItem> SelectedItem => base.SelectedItem;
public new Bindable<WorkingBeatmap> Beatmap => base.Beatmap;
public TestMatchSubScreen(Room room)
public TestTimeshiftRoomSubScreen(Room room)
: base(room)
{
}