From 4c75d696c052f189fc8e9520188aff9e97647f38 Mon Sep 17 00:00:00 2001 From: Ethan <68365423+letsgoawaydev@users.noreply.github.com> Date: Sun, 5 Oct 2025 20:04:44 +0800 Subject: [PATCH 1/3] add stream skin --- .../Overlays/Settings/Sections/SkinSection.cs | 1 + osu.Game/Skinning/SkinInfo.cs | 1 + osu.Game/Skinning/SkinManager.cs | 6 +++ osu.Game/Skinning/StreamSkin.cs | 50 +++++++++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 osu.Game/Skinning/StreamSkin.cs diff --git a/osu.Game/Overlays/Settings/Sections/SkinSection.cs b/osu.Game/Overlays/Settings/Sections/SkinSection.cs index 2c24a5b277d2..befa81c56f15 100644 --- a/osu.Game/Overlays/Settings/Sections/SkinSection.cs +++ b/osu.Game/Overlays/Settings/Sections/SkinSection.cs @@ -130,6 +130,7 @@ private void skinsChanged(IRealmCollection 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); diff --git a/osu.Game/Skinning/SkinInfo.cs b/osu.Game/Skinning/SkinInfo.cs index 4c9c16e72115..aed56354d386 100644 --- a/osu.Game/Skinning/SkinInfo.cs +++ b/osu.Game/Skinning/SkinInfo.cs @@ -21,6 +21,7 @@ public class SkinInfo : RealmObject, IHasRealmFiles, IEquatable, 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] diff --git a/osu.Game/Skinning/SkinManager.cs b/osu.Game/Skinning/SkinManager.cs index e92d0d3d49a9..0bd4d8b3b082 100644 --- a/osu.Game/Skinning/SkinManager.cs +++ b/osu.Game/Skinning/SkinManager.cs @@ -66,6 +66,8 @@ public class SkinManager : ModelManager, ISkinSource, IStorageResource private Skin retroSkin { get; } + private Skin streamSkin { get; } + public override bool PauseImports { get => base.PauseImports; @@ -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), @@ -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; diff --git a/osu.Game/Skinning/StreamSkin.cs b/osu.Game/Skinning/StreamSkin.cs new file mode 100644 index 000000000000..817fe4b06eb0 --- /dev/null +++ b/osu.Game/Skinning/StreamSkin.cs @@ -0,0 +1,50 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using System; +using JetBrains.Annotations; +using osu.Framework.Graphics.Textures; +using osu.Framework.IO.Stores; +using osu.Game.Extensions; +using osu.Game.IO; + +namespace osu.Game.Skinning +{ + /// + /// The skin from osu!stream. + /// + /// + /// The assets were taken from the osu!stream github repo https://github.com/ppy/osu-stream + /// + 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(resources.Resources, "Skins/Stream") + ) + { + } + + public override Texture? GetTexture(string componentName, WrapMode wrapModeS, WrapMode wrapModeT) + { + return base.GetTexture(componentName, wrapModeS, wrapModeT); + } + } +} From 24e4b124914f025b422809798e5d2ed687149967 Mon Sep 17 00:00:00 2001 From: Ethan <68365423+letsgoawaydev@users.noreply.github.com> Date: Mon, 6 Oct 2025 21:26:25 +0800 Subject: [PATCH 2/3] remove useless override --- osu.Game/Skinning/StreamSkin.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/osu.Game/Skinning/StreamSkin.cs b/osu.Game/Skinning/StreamSkin.cs index 817fe4b06eb0..2e616424b1a1 100644 --- a/osu.Game/Skinning/StreamSkin.cs +++ b/osu.Game/Skinning/StreamSkin.cs @@ -41,10 +41,5 @@ public StreamSkin(SkinInfo skin, IStorageResourceProvider resources) ) { } - - public override Texture? GetTexture(string componentName, WrapMode wrapModeS, WrapMode wrapModeT) - { - return base.GetTexture(componentName, wrapModeS, wrapModeT); - } } } From 8231fe18aea45d8599e8361f56973857455a43e2 Mon Sep 17 00:00:00 2001 From: Ethan <68365423+letsgoawaydev@users.noreply.github.com> Date: Tue, 7 Oct 2025 09:24:09 +0800 Subject: [PATCH 3/3] remove directives and update comment --- osu.Game/Skinning/StreamSkin.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/osu.Game/Skinning/StreamSkin.cs b/osu.Game/Skinning/StreamSkin.cs index 2e616424b1a1..4a3d9d29674e 100644 --- a/osu.Game/Skinning/StreamSkin.cs +++ b/osu.Game/Skinning/StreamSkin.cs @@ -1,9 +1,7 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -using System; using JetBrains.Annotations; -using osu.Framework.Graphics.Textures; using osu.Framework.IO.Stores; using osu.Game.Extensions; using osu.Game.IO; @@ -14,7 +12,7 @@ namespace osu.Game.Skinning /// The skin from osu!stream. /// /// - /// The assets were taken from the osu!stream github repo https://github.com/ppy/osu-stream + /// 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 /// public class StreamSkin : LegacySkin {