mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Remove all test skinning changes in favour of the ISkinSource.AllSources
path
This commit is contained in:
@ -4,11 +4,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.IO.Stores;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Screens.Play;
|
||||
using osu.Game.Skinning;
|
||||
using osu.Game.Tests.Visual;
|
||||
using osuTK.Graphics;
|
||||
@ -47,24 +49,36 @@ namespace osu.Game.Tests.Beatmaps
|
||||
|
||||
protected virtual ExposedPlayer LoadBeatmap(bool userHasCustomColours)
|
||||
{
|
||||
ExposedPlayer player;
|
||||
|
||||
Beatmap.Value = testBeatmap;
|
||||
|
||||
ExposedPlayer player = CreateTestPlayer();
|
||||
|
||||
player.SetSkin(new TestSkin(userHasCustomColours));
|
||||
|
||||
LoadScreen(player);
|
||||
LoadScreen(player = CreateTestPlayer(userHasCustomColours));
|
||||
|
||||
return player;
|
||||
}
|
||||
|
||||
protected virtual ExposedPlayer CreateTestPlayer() => new ExposedPlayer();
|
||||
protected virtual ExposedPlayer CreateTestPlayer(bool userHasCustomColours) => new ExposedPlayer(userHasCustomColours);
|
||||
|
||||
protected class ExposedPlayer : TestPlayer
|
||||
protected class ExposedPlayer : Player
|
||||
{
|
||||
public ExposedPlayer()
|
||||
: base(false, false)
|
||||
protected readonly bool UserHasCustomColours;
|
||||
|
||||
public ExposedPlayer(bool userHasCustomColours)
|
||||
: base(new PlayerConfiguration
|
||||
{
|
||||
AllowPause = false,
|
||||
ShowResults = false,
|
||||
})
|
||||
{
|
||||
UserHasCustomColours = userHasCustomColours;
|
||||
}
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||
{
|
||||
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||
dependencies.CacheAs<ISkinSource>(new TestSkin(UserHasCustomColours));
|
||||
return dependencies;
|
||||
}
|
||||
|
||||
public IReadOnlyList<Color4> UsableComboColours =>
|
||||
|
Reference in New Issue
Block a user