2019-01-24 08:43:03 +00:00
|
|
|
|
// 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.
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using osu.Game.Beatmaps.Formats;
|
2018-11-20 07:51:59 +00:00
|
|
|
|
using osuTK.Graphics;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Skinning
|
|
|
|
|
{
|
2019-08-31 03:33:29 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// An empty skin configuration.
|
|
|
|
|
/// </summary>
|
2018-04-13 09:19:50 +00:00
|
|
|
|
public class SkinConfiguration : IHasComboColours, IHasCustomColours
|
|
|
|
|
{
|
|
|
|
|
public readonly SkinInfo SkinInfo = new SkinInfo();
|
|
|
|
|
|
2019-11-07 12:55:34 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether to allow <see cref="DefaultComboColours"/> as a fallback list for when no combo colours are provided.
|
|
|
|
|
/// </summary>
|
|
|
|
|
internal bool AllowDefaultComboColoursFallback = true;
|
2019-11-06 20:20:36 +00:00
|
|
|
|
|
2019-12-21 09:36:34 +00:00
|
|
|
|
public static List<Color4> DefaultComboColours { get; } = new List<Color4>
|
2019-11-06 20:20:36 +00:00
|
|
|
|
{
|
|
|
|
|
new Color4(255, 192, 0, 255),
|
|
|
|
|
new Color4(0, 202, 0, 255),
|
|
|
|
|
new Color4(18, 124, 255, 255),
|
|
|
|
|
new Color4(242, 24, 57, 255),
|
|
|
|
|
};
|
|
|
|
|
|
2019-12-25 05:55:05 +00:00
|
|
|
|
private readonly List<Color4> comboColours = new List<Color4>();
|
2019-11-06 20:20:36 +00:00
|
|
|
|
|
2019-11-07 12:54:30 +00:00
|
|
|
|
public IReadOnlyList<Color4> ComboColours
|
2019-11-06 20:20:36 +00:00
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (comboColours.Count > 0)
|
|
|
|
|
return comboColours;
|
|
|
|
|
|
2019-11-07 12:55:34 +00:00
|
|
|
|
if (AllowDefaultComboColoursFallback)
|
2019-11-06 20:20:36 +00:00
|
|
|
|
return DefaultComboColours;
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2019-11-23 23:08:36 +00:00
|
|
|
|
public void AddComboColours(params Color4[] colours) => comboColours.AddRange(colours);
|
2019-11-07 12:54:30 +00:00
|
|
|
|
|
2018-04-13 09:19:50 +00:00
|
|
|
|
public Dictionary<string, Color4> CustomColours { get; set; } = new Dictionary<string, Color4>();
|
2018-09-27 08:27:24 +00:00
|
|
|
|
|
2019-09-03 08:57:34 +00:00
|
|
|
|
public readonly Dictionary<string, string> ConfigDictionary = new Dictionary<string, string>();
|
2018-04-13 09:19:50 +00:00
|
|
|
|
}
|
|
|
|
|
}
|