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:
parent
cd8e3f3a04
commit
c090110ae2
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user