mirror of
https://github.com/ppy/osu
synced 2024-12-24 15:53:37 +00:00
Add skin config lookup for combo colours
This commit is contained in:
parent
9710842217
commit
f95744170f
26
osu.Game/Skinning/SkinComboColourLookup.cs
Normal file
26
osu.Game/Skinning/SkinComboColourLookup.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user