mirror of
https://github.com/ppy/osu.git
synced 2025-02-19 12:23:13 +08:00
Separate default beatmap skins from DefaultSkin
This commit is contained in:
parent
9806d94b74
commit
825d61e22c
@ -324,7 +324,7 @@ namespace osu.Game.Beatmaps
|
|||||||
public bool SkinLoaded => skin.IsResultAvailable;
|
public bool SkinLoaded => skin.IsResultAvailable;
|
||||||
public ISkin Skin => skin.Value;
|
public ISkin Skin => skin.Value;
|
||||||
|
|
||||||
protected virtual ISkin GetSkin() => new DefaultSkin(null);
|
protected virtual ISkin GetSkin() => new BeatmapSkin(BeatmapInfo);
|
||||||
private readonly RecyclableLazy<ISkin> skin;
|
private readonly RecyclableLazy<ISkin> skin;
|
||||||
|
|
||||||
public abstract Stream GetStream(string storagePath);
|
public abstract Stream GetStream(string storagePath);
|
||||||
|
32
osu.Game/Skinning/BeatmapSkin.cs
Normal file
32
osu.Game/Skinning/BeatmapSkin.cs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
// 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 osu.Framework.Audio.Sample;
|
||||||
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Framework.Graphics.OpenGL.Textures;
|
||||||
|
using osu.Framework.Graphics.Textures;
|
||||||
|
using osu.Game.Audio;
|
||||||
|
using osu.Game.Beatmaps;
|
||||||
|
|
||||||
|
namespace osu.Game.Skinning
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An empty implementation of a beatmap skin, serves as a temporary default for <see cref="WorkingBeatmap"/>s.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This should be removed once <see cref="Skin"/> becomes instantiable or a new skin type for osu!lazer beatmaps is defined.
|
||||||
|
/// </remarks>
|
||||||
|
public class BeatmapSkin : Skin
|
||||||
|
{
|
||||||
|
public BeatmapSkin(BeatmapInfo beatmap)
|
||||||
|
: base(BeatmapSkinExtensions.CreateSkinInfo(beatmap), null)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Texture GetTexture(string componentName, WrapMode wrapModeS, WrapMode wrapModeT) => null;
|
||||||
|
|
||||||
|
public override IBindable<TValue> GetConfig<TLookup, TValue>(TLookup lookup) => null;
|
||||||
|
|
||||||
|
public override ISample GetSample(ISampleInfo sampleInfo) => null;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user