2019-09-03 08:57:34 +00:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
2019-01-24 08:43:03 +00:00
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2019-09-05 14:24:13 +00:00
|
|
|
|
using System.Collections.Generic;
|
2021-05-12 20:18:15 +00:00
|
|
|
|
using JetBrains.Annotations;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
using osu.Framework.Audio.Sample;
|
2019-09-03 08:57:34 +00:00
|
|
|
|
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;
|
2021-05-11 08:00:24 +00:00
|
|
|
|
using osu.Game.IO;
|
2019-09-05 14:24:13 +00:00
|
|
|
|
using osuTK.Graphics;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Skinning
|
|
|
|
|
{
|
|
|
|
|
public class DefaultSkin : Skin
|
|
|
|
|
{
|
2021-05-11 08:00:24 +00:00
|
|
|
|
public DefaultSkin(IStorageResourceProvider resources)
|
|
|
|
|
: this(SkinInfo.Default, resources)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-12 20:18:15 +00:00
|
|
|
|
[UsedImplicitly(ImplicitUseKindFlags.InstantiatedWithFixedConstructorSignature)]
|
2021-05-11 08:00:24 +00:00
|
|
|
|
public DefaultSkin(SkinInfo skin, IStorageResourceProvider resources)
|
|
|
|
|
: base(skin)
|
2018-04-13 09:19:50 +00:00
|
|
|
|
{
|
2019-08-31 03:33:29 +00:00
|
|
|
|
Configuration = new DefaultSkinConfiguration();
|
2018-04-13 09:19:50 +00:00
|
|
|
|
}
|
|
|
|
|
|
2019-08-30 05:39:02 +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
|
|
|
|
|
2021-02-18 09:32:28 +00:00
|
|
|
|
public override ISample GetSample(ISampleInfo sampleInfo) => null;
|
2019-09-03 08:57:34 +00:00
|
|
|
|
|
2019-09-05 14:24:13 +00:00
|
|
|
|
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.
|
2020-02-07 05:58:07 +00:00
|
|
|
|
case GlobalSkinColours global:
|
2019-09-05 14:24:13 +00:00
|
|
|
|
switch (global)
|
|
|
|
|
{
|
2020-02-07 05:58:07 +00:00
|
|
|
|
case GlobalSkinColours.ComboColours:
|
2019-11-07 12:54:30 +00:00
|
|
|
|
return SkinUtils.As<TValue>(new Bindable<IReadOnlyList<Color4>>(Configuration.ComboColours));
|
2019-09-05 14:24:13 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
}
|
|
|
|
|
}
|