Add support for parsing mania skin colours

This commit is contained in:
smoogipoo
2020-04-02 17:56:12 +09:00
parent 7c428011a2
commit a77933f5e0
6 changed files with 38 additions and 6 deletions

View File

@ -5,6 +5,7 @@ using NUnit.Framework;
using osu.Game.IO;
using osu.Game.Skinning;
using osu.Game.Tests.Resources;
using osuTK.Graphics;
namespace osu.Game.Tests.Skins
{
@ -83,5 +84,20 @@ namespace osu.Game.Tests.Skins
Assert.That(configs[0].HitPosition, Is.EqualTo(16));
}
}
[Test]
public void TestParseColours()
{
var decoder = new LegacyManiaSkinDecoder();
using (var resStream = TestResources.OpenResource("mania-skin-colours.ini"))
using (var stream = new LineBufferedReader(resStream))
{
var configs = decoder.Decode(stream);
Assert.That(configs.Count, Is.EqualTo(1));
Assert.That(configs[0].CustomColours, Contains.Key("ColourBarline").And.ContainValue(new Color4(50, 50, 50, 50)));
}
}
}
}