Add skin config lookup for combo colours

This commit is contained in:
Salman Ahmed 2021-05-05 07:06:26 +03:00
parent 9710842217
commit f95744170f
2 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,26 @@
// 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 osu.Game.Rulesets.Objects.Types;
namespace osu.Game.Skinning
{
public class SkinComboColourLookup
{
/// <summary>
/// The index to use for deciding the combo colour.
/// </summary>
public readonly int ColourIndex;
/// <summary>
/// The combo information requesting the colour.
/// </summary>
public readonly IHasComboInformation Combo;
public SkinComboColourLookup(int colourIndex, IHasComboInformation combo)
{
ColourIndex = colourIndex;
Combo = combo;
}
}
}

View File

@ -72,7 +72,7 @@ namespace osu.Game.Skinning
{
if (skin != null)
{
if (lookup is GlobalSkinColours || lookup is SkinCustomColourLookup)
if (lookup is GlobalSkinColours || lookup is SkinComboColourLookup || lookup is SkinCustomColourLookup)
return lookupWithFallback<TLookup, TValue>(lookup, AllowColourLookup);
return lookupWithFallback<TLookup, TValue>(lookup, AllowConfigurationLookup);