mirror of
https://github.com/osukey/osukey.git
synced 2025-05-07 22:57:31 +09:00
private goes after public
This commit is contained in:
parent
14e427fed7
commit
c58d305fc6
@ -45,43 +45,9 @@ namespace osu.Game.Tests.Visual
|
|||||||
[Cached]
|
[Cached]
|
||||||
private BackgroundScreenStack backgroundStack;
|
private BackgroundScreenStack backgroundStack;
|
||||||
|
|
||||||
private void performSetup()
|
|
||||||
{
|
|
||||||
createSongSelect();
|
|
||||||
|
|
||||||
AddStep("Load new player to song select", () => songSelect.Push(player = new DimAccessiblePlayer { Ready = true }));
|
|
||||||
AddUntilStep(() => player?.IsLoaded ?? false, "Wait for player to load");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createSongSelect()
|
|
||||||
{
|
|
||||||
AddStep("Create song select if required", () =>
|
|
||||||
{
|
|
||||||
if (songSelect == null)
|
|
||||||
{
|
|
||||||
LoadComponentAsync(new DummySongSelect(), p =>
|
|
||||||
{
|
|
||||||
songSelect = p;
|
|
||||||
screen.Push(p);
|
|
||||||
songSelect.UpdateBindables();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
AddUntilStep(() => songSelect?.IsLoaded ?? false, "Wait for song select to load");
|
|
||||||
AddUntilStep(() =>
|
|
||||||
{
|
|
||||||
if (!songSelect.IsCurrentScreen())
|
|
||||||
{
|
|
||||||
songSelect.MakeCurrent();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}, "Wait for song select is current");
|
|
||||||
}
|
|
||||||
|
|
||||||
public TestCaseBackgroundScreenBeatmap()
|
public TestCaseBackgroundScreenBeatmap()
|
||||||
{
|
{
|
||||||
InputManager.Add(backgroundStack = new BackgroundScreenStack {RelativeSizeAxes = Axes.Both});
|
InputManager.Add(backgroundStack = new BackgroundScreenStack { RelativeSizeAxes = Axes.Both });
|
||||||
InputManager.Add(screen = new ScreenStack { RelativeSizeAxes = Axes.Both });
|
InputManager.Add(screen = new ScreenStack { RelativeSizeAxes = Axes.Both });
|
||||||
|
|
||||||
AddStep("Create beatmap", () =>
|
AddStep("Create beatmap", () =>
|
||||||
@ -190,6 +156,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
songSelect.MakeCurrent();
|
songSelect.MakeCurrent();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}, "Wait for song select is current");
|
}, "Wait for song select is current");
|
||||||
AddWaitStep(5, "Wait for dim");
|
AddWaitStep(5, "Wait for dim");
|
||||||
@ -243,7 +210,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
public void TransitionTest()
|
public void TransitionTest()
|
||||||
{
|
{
|
||||||
performSetup();
|
performSetup();
|
||||||
AddStep("Transition to Results", () => player.Push(new FadeAccesibleResults(new ScoreInfo { User = new User { Username = "osu!" }})));
|
AddStep("Transition to Results", () => player.Push(new FadeAccesibleResults(new ScoreInfo { User = new User { Username = "osu!" } })));
|
||||||
AddWaitStep(5, "Wait for dim");
|
AddWaitStep(5, "Wait for dim");
|
||||||
AddAssert("Screen is undimmed", () => songSelect.IsBackgroundUndimmed());
|
AddAssert("Screen is undimmed", () => songSelect.IsBackgroundUndimmed());
|
||||||
AddAssert("Background retained from song select", () => songSelect.IsBackgroundCurrent());
|
AddAssert("Background retained from song select", () => songSelect.IsBackgroundCurrent());
|
||||||
@ -263,12 +230,48 @@ namespace osu.Game.Tests.Visual
|
|||||||
songSelect.MakeCurrent();
|
songSelect.MakeCurrent();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}, "Wait for song select is current");
|
}, "Wait for song select is current");
|
||||||
AddWaitStep(5, "Wait for dim");
|
AddWaitStep(5, "Wait for dim");
|
||||||
AddAssert("Screen is undimmed", () => songSelect.IsBackgroundUndimmed());
|
AddAssert("Screen is undimmed", () => songSelect.IsBackgroundUndimmed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void performSetup()
|
||||||
|
{
|
||||||
|
createSongSelect();
|
||||||
|
|
||||||
|
AddStep("Load new player to song select", () => songSelect.Push(player = new DimAccessiblePlayer { Ready = true }));
|
||||||
|
AddUntilStep(() => player?.IsLoaded ?? false, "Wait for player to load");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createSongSelect()
|
||||||
|
{
|
||||||
|
AddStep("Create song select if required", () =>
|
||||||
|
{
|
||||||
|
if (songSelect == null)
|
||||||
|
{
|
||||||
|
LoadComponentAsync(new DummySongSelect(), p =>
|
||||||
|
{
|
||||||
|
songSelect = p;
|
||||||
|
screen.Push(p);
|
||||||
|
songSelect.UpdateBindables();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
AddUntilStep(() => songSelect?.IsLoaded ?? false, "Wait for song select to load");
|
||||||
|
AddUntilStep(() =>
|
||||||
|
{
|
||||||
|
if (!songSelect.IsCurrentScreen())
|
||||||
|
{
|
||||||
|
songSelect.MakeCurrent();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}, "Wait for song select is current");
|
||||||
|
}
|
||||||
|
|
||||||
private class DummySongSelect : OsuScreen
|
private class DummySongSelect : OsuScreen
|
||||||
{
|
{
|
||||||
protected override BackgroundScreen CreateBackground() => new FadeAccessibleBackground();
|
protected override BackgroundScreen CreateBackground() => new FadeAccessibleBackground();
|
||||||
@ -303,7 +306,8 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
private class FadeAccesibleResults : SoloResults
|
private class FadeAccesibleResults : SoloResults
|
||||||
{
|
{
|
||||||
public FadeAccesibleResults(ScoreInfo score) : base(score)
|
public FadeAccesibleResults(ScoreInfo score)
|
||||||
|
: base(score)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -337,7 +341,8 @@ namespace osu.Game.Tests.Visual
|
|||||||
public VisualSettings VisualSettingsPos => VisualSettings;
|
public VisualSettings VisualSettingsPos => VisualSettings;
|
||||||
public BackgroundScreen ScreenPos => Background;
|
public BackgroundScreen ScreenPos => Background;
|
||||||
|
|
||||||
public DimAccessiblePlayerLoader(Player player) : base(() => player)
|
public DimAccessiblePlayerLoader(Player player)
|
||||||
|
: base(() => player)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user