osu/osu.Game/Skinning/DefaultSkin.cs

49 lines
1.6 KiB
C#
Raw Normal View History

// 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.
2018-04-13 09:19:50 +00:00
using System.Collections.Generic;
2018-04-13 09:19:50 +00:00
using osu.Framework.Audio.Sample;
using osu.Framework.Bindables;
2018-04-13 09:19:50 +00:00
using osu.Framework.Graphics;
2020-07-17 07:54:30 +00:00
using osu.Framework.Graphics.OpenGL.Textures;
2018-04-13 09:19:50 +00:00
using osu.Framework.Graphics.Textures;
2019-08-23 11:32:43 +00:00
using osu.Game.Audio;
using osuTK.Graphics;
2018-04-13 09:19:50 +00:00
namespace osu.Game.Skinning
{
public class DefaultSkin : Skin
{
public DefaultSkin()
: base(SkinInfo.Default)
{
Configuration = new DefaultSkinConfiguration();
2018-04-13 09:19:50 +00:00
}
public override Drawable GetDrawableComponent(ISkinComponent component) => null;
2018-04-13 09:19:50 +00:00
2020-07-17 07:54:30 +00:00
public override Texture GetTexture(string componentName, WrapMode wrapModeS, WrapMode wrapModeT) => null;
2018-04-13 09:19:50 +00:00
2019-08-23 11:32:43 +00:00
public override SampleChannel GetSample(ISampleInfo sampleInfo) => null;
public override IBindable<TValue> GetConfig<TLookup, TValue>(TLookup lookup)
{
switch (lookup)
{
2019-09-06 03:16:20 +00:00
// todo: this code 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 SkinUtils.As<TValue>(new Bindable<IReadOnlyList<Color4>>(Configuration.ComboColours));
}
break;
}
return null;
}
2018-04-13 09:19:50 +00:00
}
}