mirror of
https://github.com/ppy/osu
synced 2024-12-11 17:42:28 +00:00
Simplified colour config checks in SkinProvidingContainer.cs
This commit is contained in:
parent
562634dfd2
commit
99e43c77c2
@ -10,6 +10,7 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Graphics.OpenGL.Textures;
|
using osu.Framework.Graphics.OpenGL.Textures;
|
||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
using osu.Game.Audio;
|
using osu.Game.Audio;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Skinning
|
namespace osu.Game.Skinning
|
||||||
{
|
{
|
||||||
@ -72,22 +73,12 @@ namespace osu.Game.Skinning
|
|||||||
{
|
{
|
||||||
if (skin != null)
|
if (skin != null)
|
||||||
{
|
{
|
||||||
switch (lookup)
|
TValue tValueTypeCheck = default;
|
||||||
{
|
|
||||||
// todo: the GlobalSkinColours switch is pulled from LegacySkin and should not exist.
|
|
||||||
// will likely change based on how databased storage of skin configuration goes.
|
|
||||||
case GlobalSkinColours global:
|
|
||||||
switch (global)
|
|
||||||
{
|
|
||||||
case GlobalSkinColours.ComboColours:
|
|
||||||
return getBindable<TLookup, TValue>(lookup, AllowColourLookup);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
if (lookup is GlobalSkinColours || tValueTypeCheck is Color4)
|
||||||
|
return lookupWithFallback<TLookup, TValue>(lookup, AllowColourLookup);
|
||||||
default:
|
else
|
||||||
return getBindable<TLookup, TValue>(lookup, AllowConfigurationLookup);
|
return lookupWithFallback<TLookup, TValue>(lookup, AllowConfigurationLookup);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return fallbackSource?.GetConfig<TLookup, TValue>(lookup);
|
return fallbackSource?.GetConfig<TLookup, TValue>(lookup);
|
||||||
|
Loading…
Reference in New Issue
Block a user