From 416ca3ed0a8ecafa511011b678142ccbde9c5729 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Tue, 10 Dec 2024 21:39:34 +0800 Subject: [PATCH] chore(skin): P2.5 - Remove the definition from skin element. --- .../Skinning/Elements/LyricStyle.cs | 84 ------------------- 1 file changed, 84 deletions(-) delete mode 100644 osu.Game.Rulesets.Karaoke/Skinning/Elements/LyricStyle.cs diff --git a/osu.Game.Rulesets.Karaoke/Skinning/Elements/LyricStyle.cs b/osu.Game.Rulesets.Karaoke/Skinning/Elements/LyricStyle.cs deleted file mode 100644 index 18d13425e..000000000 --- a/osu.Game.Rulesets.Karaoke/Skinning/Elements/LyricStyle.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) andy840119 . Licensed under the GPL Licence. -// See the LICENCE file in the repository root for full licence text. - -using System; -using System.Collections.Generic; -using osu.Framework.Allocation; -using osu.Framework.Extensions.Color4Extensions; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Shaders; -using osu.Game.Rulesets.Karaoke.Objects.Drawables; -using osu.Game.Rulesets.Karaoke.Skinning.Tools; -using osuTK; - -namespace osu.Game.Rulesets.Karaoke.Skinning.Elements; - -public class LyricStyle : IKaraokeSkinElement -{ - public static LyricStyle CreateDefault() => new() - { - Name = "Default", - LeftLyricTextShaders = new ICustomizedShader[] - { - new StepShader - { - Name = "Step shader", - StepShaders = new ICustomizedShader[] - { - new OutlineShader - { - Radius = 3, - OutlineColour = Color4Extensions.FromHex("#CCA532"), - }, - new ShadowShader - { - ShadowColour = Color4Extensions.FromHex("#6B5B2D"), - ShadowOffset = new Vector2(3), - }, - }, - }, - }, - RightLyricTextShaders = new ICustomizedShader[] - { - new StepShader - { - Name = "Step shader", - StepShaders = new ICustomizedShader[] - { - new OutlineShader - { - Radius = 3, - OutlineColour = Color4Extensions.FromHex("#5932CC"), - }, - new ShadowShader - { - ShadowColour = Color4Extensions.FromHex("#3D2D6B"), - ShadowOffset = new Vector2(3), - }, - }, - }, - }, - }; - - public int ID { get; set; } - - public string Name { get; set; } = string.Empty; - - public IReadOnlyList LeftLyricTextShaders = Array.Empty(); - - public IReadOnlyList RightLyricTextShaders = Array.Empty(); - - public void ApplyTo(Drawable d) - { - if (d is not DrawableLyric drawableLyric) - throw new InvalidDrawableTypeException(nameof(d)); - - var shaderManager = drawableLyric.Dependencies.Get(); - drawableLyric.ApplyToLyricPieces(l => - { - // Apply shader. - l.LeftLyricTextShaders = SkinConverterTool.ConvertLeftSideShader(shaderManager, this); - l.RightLyricTextShaders = SkinConverterTool.ConvertRightSideShader(shaderManager, this); - }); - } -}