Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions osu.Game/Overlays/Settings/Sections/SkinSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ private void skinsChanged(IRealmCollection<SkinInfo> sender, ChangeSet changes)
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.CLASSIC_SKIN).ToLive(realm));
dropdownItems.Add(sender.Single(s => s.ID == SkinInfo.STREAM_SKIN).ToLive(realm));
dropdownItems.Add(sender.Single(s => s.ID == SkinInfo.RETRO_SKIN).ToLive(realm));

dropdownItems.Add(random_skin_info);
Expand Down
1 change: 1 addition & 0 deletions osu.Game/Skinning/SkinInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class SkinInfo : RealmObject, IHasRealmFiles, IEquatable<SkinInfo>, IHasG
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 RETRO_SKIN = new Guid("0555C76A-CC6B-4BB4-9548-DF76BA72EF25");
internal static readonly Guid STREAM_SKIN = new Guid("E8D8675A-CD82-4E34-84FA-2FD7AE0C270C");
internal static readonly Guid RANDOM_SKIN = new Guid("D39DFEFB-477C-4372-B1EA-2BCEA5FB8908");

[PrimaryKey]
Expand Down
6 changes: 6 additions & 0 deletions osu.Game/Skinning/SkinManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ public class SkinManager : ModelManager<SkinInfo>, ISkinSource, IStorageResource

private Skin retroSkin { get; }

private Skin streamSkin { get; }

public override bool PauseImports
{
get => base.PauseImports;
Expand Down Expand Up @@ -94,6 +96,7 @@ public SkinManager(Storage storage, RealmAccess realm, GameHost host, IResourceS
var defaultSkins = new[]
{
retroSkin = new RetroSkin(this),
streamSkin = new StreamSkin(this),
DefaultClassicSkin = new DefaultLegacySkin(this),
trianglesSkin = new TrianglesSkin(this),
argonSkin = new ArgonSkin(this),
Expand Down Expand Up @@ -375,6 +378,9 @@ public void SetSkinFromConfiguration(string guidString)

if (guid == SkinInfo.RETRO_SKIN)
skinInfo = retroSkin.SkinInfo;

if (guid == SkinInfo.STREAM_SKIN)
skinInfo = streamSkin.SkinInfo;
}

CurrentSkinInfo.Value = skinInfo ?? trianglesSkin.SkinInfo;
Expand Down
43 changes: 43 additions & 0 deletions osu.Game/Skinning/StreamSkin.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using JetBrains.Annotations;
using osu.Framework.IO.Stores;
using osu.Game.Extensions;
using osu.Game.IO;

namespace osu.Game.Skinning
{
/// <summary>
/// The skin from osu!stream.
/// </summary>
/// <remarks>
/// The assets were taken from the osu!stream GitHub repository: https://github.com/ppy/osu-stream/tree/master/Artwork, https://github.com/ppy/osu-stream/tree/master/osu!stream/Skins/Default
/// </remarks>
public class StreamSkin : LegacySkin
{
public static SkinInfo CreateInfo() => new SkinInfo
{
ID = Skinning.SkinInfo.STREAM_SKIN,
Name = "osu! \"stream\" (2011)",
Creator = "team osu!",
Protected = true,
InstantiationInfo = typeof(StreamSkin).GetInvariantInstantiationInfo(),
};

public StreamSkin(IStorageResourceProvider resources)
: this(CreateInfo(), resources)
{
}

[UsedImplicitly(ImplicitUseKindFlags.InstantiatedWithFixedConstructorSignature)]
public StreamSkin(SkinInfo skin, IStorageResourceProvider resources)
: base(
skin,
resources,
new NamespacedResourceStore<byte[]>(resources.Resources, "Skins/Stream")
)
{
}
}
}