1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 12:02:54 +08:00
osu-lazer/osu.Game/Screens/Edit/Setup/ColoursSection.cs
Bartłomiej Dach 6f2ebb20a7 Fix test failing due to null beatmap skin
Also annotate the field on `EditorBeatmap` as nullable for future
travelers.
2021-04-18 20:46:42 +02:00

38 lines
1.1 KiB
C#

// 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 System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Game.Graphics.UserInterfaceV2;
using osu.Game.Skinning;
using osuTK.Graphics;
namespace osu.Game.Screens.Edit.Setup
{
internal class ColoursSection : SetupSection
{
public override LocalisableString Title => "Colours";
private LabelledColourPalette comboColours;
[BackgroundDependencyLoader]
private void load()
{
Children = new Drawable[]
{
comboColours = new LabelledColourPalette
{
Label = "Hitcircle / Slider Combos",
ColourNamePrefix = "Combo"
}
};
var colours = Beatmap.BeatmapSkin?.GetConfig<GlobalSkinColours, IReadOnlyList<Color4>>(GlobalSkinColours.ComboColours)?.Value;
if (colours != null)
comboColours.Colours.AddRange(colours);
}
}
}