2019-01-24 16:43:03 +08: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 17:19:50 +08:00
|
|
|
|
|
2018-03-19 18:50:37 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using osu.Game.Beatmaps.Formats;
|
2018-11-20 15:51:59 +08:00
|
|
|
|
using osuTK.Graphics;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2018-03-19 18:50:37 +08:00
|
|
|
|
namespace osu.Game.Skinning
|
|
|
|
|
{
|
2019-08-31 11:33:29 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// An empty skin configuration.
|
|
|
|
|
/// </summary>
|
2020-08-31 23:23:42 +08:00
|
|
|
|
public class SkinConfiguration : IHasComboColours, IHasCustomColours
|
2018-03-19 18:50:37 +08:00
|
|
|
|
{
|
|
|
|
|
public readonly SkinInfo SkinInfo = new SkinInfo();
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2021-10-22 13:41:59 +08:00
|
|
|
|
public const decimal LATEST_VERSION = 2.7m;
|
|
|
|
|
|
2019-11-07 20:55:34 +08: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-07 04:20:36 +08:00
|
|
|
|
|
2021-10-22 13:41:59 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Legacy version of this skin.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public decimal? LegacyVersion { get; internal set; }
|
|
|
|
|
|
|
|
|
|
public enum LegacySetting
|
|
|
|
|
{
|
|
|
|
|
Version,
|
|
|
|
|
ComboPrefix,
|
|
|
|
|
ComboOverlap,
|
|
|
|
|
ScorePrefix,
|
|
|
|
|
ScoreOverlap,
|
|
|
|
|
HitCirclePrefix,
|
|
|
|
|
HitCircleOverlap,
|
|
|
|
|
AnimationFramerate,
|
2022-10-20 08:29:18 +08:00
|
|
|
|
LayeredHitSounds,
|
|
|
|
|
AllowSliderBallTint,
|
2024-07-23 23:35:25 +08:00
|
|
|
|
InputOverlayText,
|
2021-10-22 13:41:59 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-12-21 17:36:34 +08:00
|
|
|
|
public static List<Color4> DefaultComboColours { get; } = new List<Color4>
|
2019-11-07 04:20:36 +08: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),
|
|
|
|
|
};
|
|
|
|
|
|
2021-08-15 22:00:22 +08:00
|
|
|
|
public List<Color4> CustomComboColours { get; set; } = new List<Color4>();
|
2019-11-07 04:20:36 +08:00
|
|
|
|
|
2022-11-09 12:44:59 +08:00
|
|
|
|
public IReadOnlyList<Color4>? ComboColours
|
2019-11-07 04:20:36 +08:00
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2021-08-15 22:00:22 +08:00
|
|
|
|
if (CustomComboColours.Count > 0)
|
|
|
|
|
return CustomComboColours;
|
2019-11-07 04:20:36 +08:00
|
|
|
|
|
2019-11-07 20:55:34 +08:00
|
|
|
|
if (AllowDefaultComboColoursFallback)
|
2019-11-07 04:20:36 +08:00
|
|
|
|
return DefaultComboColours;
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2020-08-31 23:48:36 +08:00
|
|
|
|
public Dictionary<string, Color4> CustomColours { get; } = new Dictionary<string, Color4>();
|
2018-09-27 16:27:24 +08:00
|
|
|
|
|
2020-08-31 23:34:18 +08:00
|
|
|
|
public readonly Dictionary<string, string> ConfigDictionary = new Dictionary<string, string>();
|
2018-03-19 18:50:37 +08:00
|
|
|
|
}
|
|
|
|
|
}
|