Add texture wrapping support to skins

This commit is contained in:
smoogipoo
2020-07-17 16:54:30 +09:00
parent e651a87d1d
commit 9f7750e615
13 changed files with 49 additions and 21 deletions

View File

@ -7,6 +7,7 @@ using osu.Framework.Audio.Sample;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.OpenGL.Textures;
using osu.Framework.Graphics.Textures;
using osu.Game.Audio;
@ -47,13 +48,13 @@ namespace osu.Game.Skinning
return fallbackSource?.GetDrawableComponent(component);
}
public Texture GetTexture(string componentName)
public Texture GetTexture(string componentName, WrapMode wrapModeS, WrapMode wrapModeT)
{
Texture sourceTexture;
if (AllowTextureLookup(componentName) && (sourceTexture = skin?.GetTexture(componentName)) != null)
if (AllowTextureLookup(componentName) && (sourceTexture = skin?.GetTexture(componentName, wrapModeS, wrapModeT)) != null)
return sourceTexture;
return fallbackSource?.GetTexture(componentName);
return fallbackSource?.GetTexture(componentName, wrapModeS, wrapModeT);
}
public SampleChannel GetSample(ISampleInfo sampleInfo)