mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:02:55 +08:00
Fix ruleset skins incorrectly providing configuration defaults
This commit is contained in:
parent
49fb21ffa9
commit
12eeec36fc
@ -13,7 +13,7 @@ namespace osu.Game.Skinning
|
||||
public DefaultSkin()
|
||||
: base(SkinInfo.Default)
|
||||
{
|
||||
Configuration = new SkinConfiguration();
|
||||
Configuration = new DefaultSkinConfiguration();
|
||||
}
|
||||
|
||||
public override Drawable GetDrawableComponent(string componentName) => null;
|
||||
|
28
osu.Game/Skinning/DefaultSkinConfiguration.cs
Normal file
28
osu.Game/Skinning/DefaultSkinConfiguration.cs
Normal file
@ -0,0 +1,28 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Skinning
|
||||
{
|
||||
/// <summary>
|
||||
/// A skin configuration pre-populated with sane defaults.
|
||||
/// </summary>
|
||||
public class DefaultSkinConfiguration : SkinConfiguration
|
||||
{
|
||||
public DefaultSkinConfiguration()
|
||||
{
|
||||
HitCircleFont = "default";
|
||||
|
||||
ComboColours.AddRange(new[]
|
||||
{
|
||||
new Color4(17, 136, 170, 255),
|
||||
new Color4(102, 136, 0, 255),
|
||||
new Color4(204, 102, 0, 255),
|
||||
new Color4(121, 9, 13, 255)
|
||||
});
|
||||
|
||||
CursorExpand = true;
|
||||
}
|
||||
}
|
||||
}
|
@ -34,7 +34,7 @@ namespace osu.Game.Skinning
|
||||
using (StreamReader reader = new StreamReader(stream))
|
||||
Configuration = new LegacySkinDecoder().Decode(reader);
|
||||
else
|
||||
Configuration = new SkinConfiguration();
|
||||
Configuration = new DefaultSkinConfiguration();
|
||||
|
||||
Samples = audioManager.GetSampleStore(storage);
|
||||
Textures = new TextureStore(new TextureLoaderStore(storage));
|
||||
|
@ -7,21 +7,18 @@ using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Skinning
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty skin configuration.
|
||||
/// </summary>
|
||||
public class SkinConfiguration : IHasComboColours, IHasCustomColours
|
||||
{
|
||||
public readonly SkinInfo SkinInfo = new SkinInfo();
|
||||
|
||||
public List<Color4> ComboColours { get; set; } = new List<Color4>
|
||||
{
|
||||
new Color4(17, 136, 170, 255),
|
||||
new Color4(102, 136, 0, 255),
|
||||
new Color4(204, 102, 0, 255),
|
||||
new Color4(121, 9, 13, 255)
|
||||
};
|
||||
public List<Color4> ComboColours { get; set; } = new List<Color4>();
|
||||
|
||||
public Dictionary<string, Color4> CustomColours { get; set; } = new Dictionary<string, Color4>();
|
||||
|
||||
public string HitCircleFont { get; set; } = "default";
|
||||
public string HitCircleFont { get; set; }
|
||||
|
||||
public int HitCircleOverlap { get; set; }
|
||||
|
||||
@ -29,6 +26,6 @@ namespace osu.Game.Skinning
|
||||
|
||||
public float? SliderPathRadius { get; set; }
|
||||
|
||||
public bool? CursorExpand { get; set; } = true;
|
||||
public bool? CursorExpand { get; set; }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user