osu/osu.Game/Skinning/DefaultSkin.cs

57 lines
1.9 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;
using JetBrains.Annotations;
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 osu.Game.IO;
using osuTK.Graphics;
2018-04-13 09:19:50 +00:00
namespace osu.Game.Skinning
{
public class DefaultSkin : Skin
{
public DefaultSkin(IStorageResourceProvider resources)
: this(SkinInfo.Default, resources)
{
}
[UsedImplicitly(ImplicitUseKindFlags.InstantiatedWithFixedConstructorSignature)]
public DefaultSkin(SkinInfo skin, IStorageResourceProvider resources)
: base(skin)
2018-04-13 09:19:50 +00:00
{
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
public override ISample 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
}
}