2019-08-29 15:38:39 +08:00
// 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.
2022-06-17 15:37:17 +08:00
#nullable disable
2021-08-15 22:00:22 +08:00
using System.Collections.Generic ;
2021-05-13 04:18:15 +08:00
using JetBrains.Annotations ;
2019-08-29 15:38:39 +08:00
using osu.Framework.IO.Stores ;
2021-05-13 05:34:25 +08:00
using osu.Game.Extensions ;
2020-12-21 14:14:32 +08:00
using osu.Game.IO ;
2019-09-03 17:05:16 +08:00
using osuTK.Graphics ;
2019-08-29 15:38:39 +08:00
namespace osu.Game.Skinning
{
public class DefaultLegacySkin : LegacySkin
{
2021-11-29 16:15:26 +08:00
public static SkinInfo CreateInfo ( ) = > new SkinInfo
{
ID = Skinning . SkinInfo . CLASSIC_SKIN , // this is temporary until database storage is decided upon.
2022-09-15 14:49:15 +08:00
Name = "osu! \"classic\" (2013)" ,
2021-11-29 16:15:26 +08:00
Creator = "team osu!" ,
Protected = true ,
InstantiationInfo = typeof ( DefaultLegacySkin ) . GetInvariantInstantiationInfo ( )
} ;
2021-05-31 17:58:40 +08:00
public DefaultLegacySkin ( IStorageResourceProvider resources )
2021-11-29 16:15:26 +08:00
: this ( CreateInfo ( ) , resources )
2021-05-11 16:00:24 +08:00
{
}
2021-05-13 05:53:39 +08:00
[UsedImplicitly(ImplicitUseKindFlags.InstantiatedWithFixedConstructorSignature)]
2021-05-31 17:58:40 +08:00
public DefaultLegacySkin ( SkinInfo skin , IStorageResourceProvider resources )
2021-10-22 12:43:45 +08:00
: base (
skin ,
2022-03-23 14:02:01 +08:00
resources ,
2022-03-23 13:38:40 +08:00
// In the case of the actual default legacy skin (ie. the fallback one, which a user hasn't applied any modifications to) we want to use the game provided resources.
2022-03-23 14:05:01 +08:00
skin . Protected ? new NamespacedResourceStore < byte [ ] > ( resources . Resources , "Skins/Legacy" ) : null
2021-10-22 12:43:45 +08:00
)
2019-08-29 15:38:39 +08:00
{
2019-09-03 17:05:16 +08:00
Configuration . CustomColours [ "SliderBall" ] = new Color4 ( 2 , 170 , 255 , 255 ) ;
2021-08-15 22:00:22 +08:00
Configuration . CustomComboColours = new List < Color4 >
{
2019-09-19 11:39:15 +08:00
new Color4 ( 255 , 192 , 0 , 255 ) ,
new Color4 ( 0 , 202 , 0 , 255 ) ,
new Color4 ( 18 , 124 , 255 , 255 ) ,
2019-11-07 20:54:30 +08:00
new Color4 ( 242 , 24 , 57 , 255 )
2021-08-15 22:00:22 +08:00
} ;
2019-10-10 04:06:32 +08:00
2022-10-20 08:29:18 +08:00
Configuration . ConfigDictionary [ nameof ( SkinConfiguration . LegacySetting . AllowSliderBallTint ) ] = @"true" ;
2020-04-08 18:19:14 +08:00
Configuration . LegacyVersion = 2.7 m ;
2019-08-29 15:38:39 +08:00
}
}
}