Move combo colours to GlobalSkinColours

This commit is contained in:
Dean Herbert
2020-02-07 14:58:07 +09:00
parent 55a8e88609
commit 7460018cd3
10 changed files with 22 additions and 19 deletions

View File

@ -1,6 +1,7 @@
// 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;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@ -68,22 +69,22 @@ namespace osu.Game.Skinning
{
switch (lookup)
{
case GlobalSkinConfiguration global:
switch (global)
case GlobalSkinColours colour:
switch (colour)
{
case GlobalSkinConfiguration.ComboColours:
case GlobalSkinColours.ComboColours:
var comboColours = Configuration.ComboColours;
if (comboColours != null)
return SkinUtils.As<TValue>(new Bindable<IReadOnlyList<Color4>>(comboColours));
break;
default:
return SkinUtils.As<TValue>(getCustomColour(colour.ToString()));
}
break;
case GlobalSkinColour colour:
return SkinUtils.As<TValue>(getCustomColour(colour.ToString()));
case LegacySkinConfiguration.LegacySetting legacy:
switch (legacy)
{
@ -100,6 +101,8 @@ namespace osu.Game.Skinning
return SkinUtils.As<TValue>(getCustomColour(customColour.Lookup.ToString()));
default:
// handles lookups like GlobalSkinConfiguration
try
{
if (Configuration.ConfigDictionary.TryGetValue(lookup.ToString(), out var val))