Allow skinnable drawables to be of non-restricted size

This commit is contained in:
Dean Herbert
2018-03-07 18:20:20 +09:00
parent fbe8641ec4
commit bd952ce370
2 changed files with 28 additions and 11 deletions

View File

@ -32,12 +32,7 @@ namespace osu.Game.Skinning
var texture = textures.Get(componentName);
if (texture == null) return null;
return new Sprite
{
RelativeSizeAxes = Axes.Both,
FillMode = FillMode.Fit,
Texture = texture,
};
return new Sprite { Texture = texture };
}
public override SampleChannel GetSample(string sampleName) => samples.Get(sampleName);
@ -48,7 +43,8 @@ namespace osu.Game.Skinning
private readonly IResourceStore<byte[]> underlyingStore;
private string getPathForFile(string filename) =>
skin.Files.FirstOrDefault(f => string.Equals(Path.GetFileNameWithoutExtension(f.Filename), filename.Split('/').Last(), StringComparison.InvariantCultureIgnoreCase))?.FileInfo.StoragePath;
skin.Files.FirstOrDefault(f => string.Equals(Path.GetFileNameWithoutExtension(f.Filename), filename.Split('/').Last(), StringComparison.InvariantCultureIgnoreCase))?.FileInfo
.StoragePath;
public LegacySkinResourceStore(SkinInfo skin, IResourceStore<byte[]> underlyingStore)
{