1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

Add StablePathSelectScreen visual test

This commit is contained in:
Shivam 2020-05-22 19:51:08 +02:00
parent 451275496f
commit 0717dab8e4
2 changed files with 33 additions and 2 deletions

View File

@ -0,0 +1,30 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Tournament.Screens;
using osu.Framework.Platform;
namespace osu.Game.Tournament.Tests.Screens
{
public class TestSceneStablePathSelectScreens : TournamentTestScene
{
public TestSceneStablePathSelectScreens()
{
AddStep("Add screen", () => Add(new TestSceneStablePathSelectScreen()));
}
private class TestSceneStablePathSelectScreen : StablePathSelectScreen
{
protected override void changePath(Storage storage)
{
Expire();
}
protected override void autoDetect()
{
Expire();
}
}
}
}

View File

@ -14,6 +14,7 @@ using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Graphics.UserInterfaceV2;
using osu.Game.Overlays;
using osu.Game.Overlays.Dialog;
using osu.Game.Tournament.IPC;
using osu.Game.Tournament.Components;
using osuTK;
@ -135,7 +136,7 @@ namespace osu.Game.Tournament.Screens
});
}
private void changePath(Storage storage)
protected virtual void changePath(Storage storage)
{
var target = directorySelector.CurrentDirectory.Value.FullName;
stableInfo.StablePath.Value = target;
@ -156,7 +157,7 @@ namespace osu.Game.Tournament.Screens
sceneManager?.SetScreen(typeof(SetupScreen));
}
private void autoDetect()
protected virtual void autoDetect()
{
var fileBasedIpc = ipc as FileBasedIPC;
fileBasedIpc?.LocateStableStorage();