1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 11:02:54 +08:00

Add argon pro skin

This commit is contained in:
Dean Herbert 2022-12-12 15:52:29 +09:00 committed by Jamie Taylor
parent ca8d2bec9d
commit 2f0c772dcb
No known key found for this signature in database
GPG Key ID: 2ACFA8B6370B8C8C
6 changed files with 55 additions and 3 deletions

View File

@ -105,6 +105,7 @@ namespace osu.Game.Overlays.Settings.Sections
dropdownItems.Clear(); dropdownItems.Clear();
dropdownItems.Add(sender.Single(s => s.ID == SkinInfo.ARGON_SKIN).ToLive(realm)); dropdownItems.Add(sender.Single(s => s.ID == SkinInfo.ARGON_SKIN).ToLive(realm));
dropdownItems.Add(sender.Single(s => s.ID == SkinInfo.ARGON_PRO_SKIN).ToLive(realm));
dropdownItems.Add(sender.Single(s => s.ID == SkinInfo.TRIANGLES_SKIN).ToLive(realm)); dropdownItems.Add(sender.Single(s => s.ID == SkinInfo.TRIANGLES_SKIN).ToLive(realm));
dropdownItems.Add(sender.Single(s => s.ID == SkinInfo.CLASSIC_SKIN).ToLive(realm)); dropdownItems.Add(sender.Single(s => s.ID == SkinInfo.CLASSIC_SKIN).ToLive(realm));

View File

@ -0,0 +1,48 @@
// 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.
using JetBrains.Annotations;
using osu.Framework.Audio.Sample;
using osu.Game.Audio;
using osu.Game.Extensions;
using osu.Game.IO;
namespace osu.Game.Skinning
{
public class ArgonProSkin : ArgonSkin
{
public new static SkinInfo CreateInfo() => new SkinInfo
{
ID = Skinning.SkinInfo.ARGON_PRO_SKIN,
Name = "osu! \"argon\" pro (2022)",
Creator = "team osu!",
Protected = true,
InstantiationInfo = typeof(ArgonProSkin).GetInvariantInstantiationInfo()
};
public override ISample? GetSample(ISampleInfo sampleInfo)
{
foreach (string lookup in sampleInfo.LookupNames)
{
string remappedLookup = lookup.Replace("Gameplay/", "Gameplay/Pro/");
var sample = Samples?.Get(remappedLookup) ?? Resources.AudioManager?.Samples.Get(remappedLookup);
if (sample != null)
return sample;
}
return null;
}
public ArgonProSkin(IStorageResourceProvider resources)
: this(CreateInfo(), resources)
{
}
[UsedImplicitly(ImplicitUseKindFlags.InstantiatedWithFixedConstructorSignature)]
public ArgonProSkin(SkinInfo skin, IStorageResourceProvider resources)
: base(skin, resources)
{
}
}
}

View File

@ -30,7 +30,7 @@ namespace osu.Game.Skinning
InstantiationInfo = typeof(ArgonSkin).GetInvariantInstantiationInfo() InstantiationInfo = typeof(ArgonSkin).GetInvariantInstantiationInfo()
}; };
private readonly IStorageResourceProvider resources; protected readonly IStorageResourceProvider Resources;
public ArgonSkin(IStorageResourceProvider resources) public ArgonSkin(IStorageResourceProvider resources)
: this(CreateInfo(), resources) : this(CreateInfo(), resources)
@ -41,7 +41,7 @@ namespace osu.Game.Skinning
public ArgonSkin(SkinInfo skin, IStorageResourceProvider resources) public ArgonSkin(SkinInfo skin, IStorageResourceProvider resources)
: base(skin, resources) : base(skin, resources)
{ {
this.resources = resources; Resources = resources;
Configuration.CustomComboColours = new List<Color4> Configuration.CustomComboColours = new List<Color4>
{ {
@ -72,7 +72,7 @@ namespace osu.Game.Skinning
{ {
foreach (string lookup in sampleInfo.LookupNames) foreach (string lookup in sampleInfo.LookupNames)
{ {
var sample = Samples?.Get(lookup) ?? resources.AudioManager?.Samples.Get(lookup); var sample = Samples?.Get(lookup) ?? Resources.AudioManager?.Samples.Get(lookup);
if (sample != null) if (sample != null)
return sample; return sample;
} }

View File

@ -20,6 +20,7 @@ namespace osu.Game.Skinning
{ {
internal static readonly Guid TRIANGLES_SKIN = new Guid("2991CFD8-2140-469A-BCB9-2EC23FBCE4AD"); internal static readonly Guid TRIANGLES_SKIN = new Guid("2991CFD8-2140-469A-BCB9-2EC23FBCE4AD");
internal static readonly Guid ARGON_SKIN = new Guid("CFFA69DE-B3E3-4DEE-8563-3C4F425C05D0"); internal static readonly Guid ARGON_SKIN = new Guid("CFFA69DE-B3E3-4DEE-8563-3C4F425C05D0");
internal static readonly Guid ARGON_PRO_SKIN = new Guid("9FC9CF5D-0F16-4C71-8256-98868321AC43");
internal static readonly Guid CLASSIC_SKIN = new Guid("81F02CD3-EEC6-4865-AC23-FAE26A386187"); internal static readonly Guid CLASSIC_SKIN = new Guid("81F02CD3-EEC6-4865-AC23-FAE26A386187");
internal static readonly Guid RANDOM_SKIN = new Guid("D39DFEFB-477C-4372-B1EA-2BCEA5FB8908"); internal static readonly Guid RANDOM_SKIN = new Guid("D39DFEFB-477C-4372-B1EA-2BCEA5FB8908");

View File

@ -84,6 +84,7 @@ namespace osu.Game.Skinning
DefaultClassicSkin = new DefaultLegacySkin(this), DefaultClassicSkin = new DefaultLegacySkin(this),
trianglesSkin = new TrianglesSkin(this), trianglesSkin = new TrianglesSkin(this),
argonSkin = new ArgonSkin(this), argonSkin = new ArgonSkin(this),
new ArgonProSkin(this),
}; };
// Ensure the default entries are present. // Ensure the default entries are present.

View File

@ -111,6 +111,7 @@ namespace osu.Game.Skinning
// Temporarily used to exclude undesirable ISkin implementations // Temporarily used to exclude undesirable ISkin implementations
static bool isUserSkin(ISkin skin) static bool isUserSkin(ISkin skin)
=> skin.GetType() == typeof(TrianglesSkin) => skin.GetType() == typeof(TrianglesSkin)
|| skin.GetType() == typeof(ArgonProSkin)
|| skin.GetType() == typeof(ArgonSkin) || skin.GetType() == typeof(ArgonSkin)
|| skin.GetType() == typeof(DefaultLegacySkin) || skin.GetType() == typeof(DefaultLegacySkin)
|| skin.GetType() == typeof(LegacySkin); || skin.GetType() == typeof(LegacySkin);