1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-16 22:17:19 +08:00

Use editable skin structure in combo colour picker

This commit is contained in:
Bartłomiej Dach 2021-08-15 16:32:26 +02:00
parent 0d64da8c63
commit 81280dfd25
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

@ -1,14 +1,10 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // 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. // See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Localisation; using osu.Framework.Localisation;
using osu.Game.Graphics.UserInterfaceV2; using osu.Game.Graphics.UserInterfaceV2;
using osu.Game.Skinning;
using osuTK.Graphics;
namespace osu.Game.Screens.Edit.Setup namespace osu.Game.Screens.Edit.Setup
{ {
@ -31,9 +27,8 @@ namespace osu.Game.Screens.Edit.Setup
} }
}; };
var colours = Beatmap.BeatmapSkin?.GetConfig<GlobalSkinColours, IReadOnlyList<Color4>>(GlobalSkinColours.ComboColours)?.Value; if (Beatmap.BeatmapSkin != null)
if (colours != null) comboColours.Colours.BindTo(Beatmap.BeatmapSkin.ComboColours);
comboColours.Colours.AddRange(colours.Select(c => (Colour4)c));
} }
} }
} }