1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 09:32:55 +08:00

Provide cell skin on content creation

This commit is contained in:
Salman Ahmed 2021-06-01 10:13:56 +03:00
parent cd8e3f3a04
commit c090110ae2

View File

@ -52,7 +52,9 @@ namespace osu.Game.Tests.Visual
private readonly List<Drawable> createdDrawables = new List<Drawable>();
public void SetContents(Func<Drawable> creationFunction)
public void SetContents(Func<Drawable> creationFunction) => SetContents(_ => creationFunction?.Invoke());
public void SetContents(Func<ISkin, Drawable> creationFunction)
{
createdDrawables.Clear();
@ -67,9 +69,9 @@ namespace osu.Game.Tests.Visual
protected IEnumerable<Drawable> CreatedDrawables => createdDrawables;
private Drawable createProvider(Skin skin, Func<Drawable> creationFunction, IBeatmap beatmap)
private Drawable createProvider(Skin skin, Func<ISkin, Drawable> creationFunction, IBeatmap beatmap)
{
var created = creationFunction();
var created = creationFunction(skin);
createdDrawables.Add(created);