mirror of
https://github.com/ppy/osu
synced 2025-01-04 21:30:08 +00:00
Simplify instantiation
This commit is contained in:
parent
e8e9fdd533
commit
f777741ca7
@ -96,12 +96,14 @@ namespace osu.Game.Skinning
|
||||
{
|
||||
int defaultSkinIndex = SkinSources.IndexOf(skinManager.DefaultSkin);
|
||||
|
||||
var rulesetResources = new ResourcesSkin(resources, host, audio);
|
||||
|
||||
if (defaultSkinIndex >= 0)
|
||||
SkinSources.Insert(defaultSkinIndex, new ResourcesSkin(resources, host, audio));
|
||||
SkinSources.Insert(defaultSkinIndex, rulesetResources);
|
||||
else
|
||||
{
|
||||
// Tests may potentially override the SkinManager with another source that doesn't include it in AllSources.
|
||||
SkinSources.Add(new ResourcesSkin(resources, host, audio));
|
||||
SkinSources.Add(rulesetResources);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user