// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. #nullable disable using System.Collections.Generic; using osu.Game.Beatmaps.Formats; using osuTK.Graphics; namespace osu.Game.Skinning { /// /// An empty skin configuration. /// public class SkinConfiguration : IHasComboColours, IHasCustomColours { public readonly SkinInfo SkinInfo = new SkinInfo(); public const decimal LATEST_VERSION = 2.7m; /// /// Whether to allow as a fallback list for when no combo colours are provided. /// internal bool AllowDefaultComboColoursFallback = true; /// /// Legacy version of this skin. /// public decimal? LegacyVersion { get; internal set; } public enum LegacySetting { Version, ComboPrefix, ComboOverlap, ScorePrefix, ScoreOverlap, HitCirclePrefix, HitCircleOverlap, AnimationFramerate, LayeredHitSounds, AllowSliderBallTint, } public static List DefaultComboColours { get; } = new List { new Color4(255, 192, 0, 255), new Color4(0, 202, 0, 255), new Color4(18, 124, 255, 255), new Color4(242, 24, 57, 255), }; public List CustomComboColours { get; set; } = new List(); public IReadOnlyList ComboColours { get { if (CustomComboColours.Count > 0) return CustomComboColours; if (AllowDefaultComboColoursFallback) return DefaultComboColours; return null; } } void IHasComboColours.AddComboColours(params Color4[] colours) => CustomComboColours.AddRange(colours); public Dictionary CustomColours { get; } = new Dictionary(); public readonly Dictionary ConfigDictionary = new Dictionary(); } }