-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the internal skin storage resource provider public.
- Loading branch information
1 parent
2f92d07
commit 276c4a9
Showing
2 changed files
with
32 additions
and
28 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
osu.Game.Rulesets.Karaoke/Skinning/InternalSkinStorageResourceProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
#nullable disable | ||
|
||
using osu.Framework.Audio; | ||
using osu.Framework.Graphics.Rendering; | ||
using osu.Framework.Graphics.Rendering.Dummy; | ||
using osu.Framework.Graphics.Textures; | ||
using osu.Framework.IO.Stores; | ||
using osu.Game.Database; | ||
using osu.Game.IO; | ||
|
||
namespace osu.Game.Rulesets.Karaoke.Skinning | ||
{ | ||
public class InternalSkinStorageResourceProvider : IStorageResourceProvider | ||
{ | ||
public InternalSkinStorageResourceProvider(string skinName) | ||
{ | ||
var store = new KaraokeRuleset().CreateResourceStore(); | ||
Files = Resources = new NamespacedResourceStore<byte[]>(store, $"Skin/{skinName}"); | ||
} | ||
|
||
public IRenderer Renderer => new DummyRenderer(); | ||
|
||
public AudioManager AudioManager => null; | ||
public IResourceStore<byte[]> Files { get; } | ||
public IResourceStore<byte[]> Resources { get; } | ||
public RealmAccess RealmAccess => null; | ||
public IResourceStore<TextureUpload> CreateTextureLoaderStore(IResourceStore<byte[]> underlyingStore) => null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters