mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 19:22:54 +08:00
Add colours section with combo colour display
This commit is contained in:
parent
577755ee19
commit
07a00cd681
37
osu.Game/Screens/Edit/Setup/ColoursSection.cs
Normal file
37
osu.Game/Screens/Edit/Setup/ColoursSection.cs
Normal file
@ -0,0 +1,37 @@
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
@ -61,6 +61,7 @@ namespace osu.Game.Screens.Edit.Setup
|
||||
new ResourcesSection(),
|
||||
new MetadataSection(),
|
||||
new DifficultySection(),
|
||||
new ColoursSection()
|
||||
}
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user