1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 09:23:06 +08:00

Remove mentioning of "layer" in skin providers

`SkinSources` sounds better.
This commit is contained in:
Salman Ahmed 2021-06-10 11:55:22 +03:00
parent 1aaad7bfd4
commit 18edbdd135
2 changed files with 9 additions and 9 deletions

View File

@ -52,8 +52,8 @@ namespace osu.Game.Skinning
private void updateSkins() private void updateSkins()
{ {
SkinLayers.Clear(); SkinSources.Clear();
SkinLayers.AddRange(skinManager.CurrentSkinLayers.Select(s => ruleset.CreateLegacySkinProvider(s, beatmap))); SkinSources.AddRange(skinManager.CurrentSkinLayers.Select(s => ruleset.CreateLegacySkinProvider(s, beatmap)));
} }
} }
} }

View File

@ -25,7 +25,7 @@ namespace osu.Game.Skinning
/// <summary> /// <summary>
/// The list of skins provided by this <see cref="SkinProvidingContainer"/>. /// The list of skins provided by this <see cref="SkinProvidingContainer"/>.
/// </summary> /// </summary>
protected readonly List<ISkin> SkinLayers = new List<ISkin>(); protected readonly List<ISkin> SkinSources = new List<ISkin>();
[CanBeNull] [CanBeNull]
private ISkinSource fallbackSource; private ISkinSource fallbackSource;
@ -43,7 +43,7 @@ namespace osu.Game.Skinning
public SkinProvidingContainer(ISkin skin) public SkinProvidingContainer(ISkin skin)
: this() : this()
{ {
SkinLayers.Add(skin); SkinSources.Add(skin);
} }
protected SkinProvidingContainer() protected SkinProvidingContainer()
@ -53,7 +53,7 @@ namespace osu.Game.Skinning
public ISkin FindProvider(Func<ISkin, bool> lookupFunction) public ISkin FindProvider(Func<ISkin, bool> lookupFunction)
{ {
foreach (var skin in SkinLayers) foreach (var skin in SkinSources)
{ {
if (skin is ISkinSource source) if (skin is ISkinSource source)
{ {
@ -74,7 +74,7 @@ namespace osu.Game.Skinning
{ {
if (AllowDrawableLookup(component)) if (AllowDrawableLookup(component))
{ {
foreach (var skin in SkinLayers) foreach (var skin in SkinSources)
{ {
Drawable sourceDrawable; Drawable sourceDrawable;
if ((sourceDrawable = skin?.GetDrawableComponent(component)) != null) if ((sourceDrawable = skin?.GetDrawableComponent(component)) != null)
@ -89,7 +89,7 @@ namespace osu.Game.Skinning
{ {
if (AllowTextureLookup(componentName)) if (AllowTextureLookup(componentName))
{ {
foreach (var skin in SkinLayers) foreach (var skin in SkinSources)
{ {
Texture sourceTexture; Texture sourceTexture;
if ((sourceTexture = skin?.GetTexture(componentName, wrapModeS, wrapModeT)) != null) if ((sourceTexture = skin?.GetTexture(componentName, wrapModeS, wrapModeT)) != null)
@ -104,7 +104,7 @@ namespace osu.Game.Skinning
{ {
if (AllowSampleLookup(sampleInfo)) if (AllowSampleLookup(sampleInfo))
{ {
foreach (var skin in SkinLayers) foreach (var skin in SkinSources)
{ {
ISample sourceSample; ISample sourceSample;
if ((sourceSample = skin?.GetSample(sampleInfo)) != null) if ((sourceSample = skin?.GetSample(sampleInfo)) != null)
@ -127,7 +127,7 @@ namespace osu.Game.Skinning
{ {
if (canUseSkinLookup) if (canUseSkinLookup)
{ {
foreach (var skin in SkinLayers) foreach (var skin in SkinSources)
{ {
IBindable<TValue> bindable; IBindable<TValue> bindable;
if ((bindable = skin?.GetConfig<TLookup, TValue>(lookup)) != null) if ((bindable = skin?.GetConfig<TLookup, TValue>(lookup)) != null)