mirror of https://github.com/ppy/osu
Allow import of skins which don't have ini files
This commit is contained in:
parent
7272ba2f1b
commit
b71c123214
|
@ -26,10 +26,13 @@ public LegacySkin(SkinInfo skin, IResourceStore<byte[]> storage, AudioManager au
|
||||||
samples = audioManager.GetSampleManager(storage);
|
samples = audioManager.GetSampleManager(storage);
|
||||||
textures = new TextureStore(new RawTextureLoaderStore(storage));
|
textures = new TextureStore(new RawTextureLoaderStore(storage));
|
||||||
|
|
||||||
var decoder = new LegacySkinDecoder();
|
Stream stream = storage.GetStream("skin.ini");
|
||||||
|
|
||||||
using (StreamReader reader = new StreamReader(storage.GetStream("skin.ini")))
|
if (stream != null)
|
||||||
Configuration = decoder.Decode(reader);
|
using (StreamReader reader = new StreamReader(stream))
|
||||||
|
Configuration = new LegacySkinDecoder().Decode(reader);
|
||||||
|
else
|
||||||
|
Configuration = new SkinConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Drawable GetDrawableComponent(string componentName)
|
public override Drawable GetDrawableComponent(string componentName)
|
||||||
|
|
Loading…
Reference in New Issue