Expose default SkinManager providers for use in RulesetSkinProvidingContainer

This commit is contained in:
Salman Ahmed
2021-06-10 13:04:34 +03:00
parent 59be3588eb
commit c3a2f2c2a4
2 changed files with 19 additions and 4 deletions

View File

@ -1,7 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@ -53,7 +52,13 @@ namespace osu.Game.Skinning
private void updateSkins()
{
SkinSources.Clear();
SkinSources.AddRange(skinManager.CurrentSkinLayers.Select(s => ruleset.CreateLegacySkinProvider(s, beatmap)));
SkinSources.Add(ruleset.CreateLegacySkinProvider(skinManager.CurrentSkin.Value, beatmap));
if (skinManager.CurrentSkin.Value is LegacySkin)
SkinSources.Add(ruleset.CreateLegacySkinProvider(skinManager.DefaultLegacySkin, beatmap));
SkinSources.Add(ruleset.CreateLegacySkinProvider(skinManager.DefaultSkin, beatmap));
}
}
}