mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 10:22:56 +08: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);
|
int defaultSkinIndex = SkinSources.IndexOf(skinManager.DefaultSkin);
|
||||||
|
|
||||||
|
var rulesetResources = new ResourcesSkin(resources, host, audio);
|
||||||
|
|
||||||
if (defaultSkinIndex >= 0)
|
if (defaultSkinIndex >= 0)
|
||||||
SkinSources.Insert(defaultSkinIndex, new ResourcesSkin(resources, host, audio));
|
SkinSources.Insert(defaultSkinIndex, rulesetResources);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Tests may potentially override the SkinManager with another source that doesn't include it in AllSources.
|
// 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