Refactor skin configuration to be infinitely extensible

This commit is contained in:
Dean Herbert
2019-09-03 17:57:34 +09:00
parent 976f5020c0
commit bebc3309ce
28 changed files with 214 additions and 107 deletions

View File

@ -122,7 +122,7 @@ namespace osu.Game.Screens.Menu
Color4 defaultColour = Color4.White.Opacity(0.2f);
if (user.Value?.IsSupporter ?? false)
AccentColour = skin.Value.GetValue<SkinConfiguration, Color4?>(s => s.CustomColours.ContainsKey("MenuGlow") ? s.CustomColours["MenuGlow"] : (Color4?)null) ?? defaultColour;
AccentColour = skin.Value.GetConfig<GlobalSkinColour, Color4>(GlobalSkinColour.MenuGlow)?.Value ?? defaultColour;
else
AccentColour = defaultColour;
}