From d6cc22f20ceed890b4a33532627605cf3bbc84e5 Mon Sep 17 00:00:00 2001 From: LA <1245661240@qq.com> Date: Thu, 26 Feb 2026 19:28:14 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=B4=E6=8A=A4=E8=AE=BE=E7=BD=AE=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E5=8C=96=E3=80=81=E4=BB=A3=E7=A0=81=E8=B4=A8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LAsEzMania/Helper/CustomHitWindows.cs | 4 +- .../Mods/LAsMods/ManiaModPatternShift.cs | 2 +- .../Scoring/ManiaHealthProcessor.cs | 4 +- .../Skinning/Ez2/ManiaEz2SkinTransformer.cs | 2 +- .../Skinning/Ez2HUD/YuComFastSlowDisplay.cs | 38 +++++++++---------- .../Ez2HUD/YuComFastSlowDisplay_Helper.cs | 6 +-- .../Skinning/EzStylePro/EzJudgementLine.cs | 8 ++-- .../ManiaEzStyleProSkinTransformer.cs | 2 +- .../Skinning/SbI/ManiaSbISkinTransformer.cs | 2 +- .../Audio/InputAudioLatencyTracker.cs | 4 -- .../Localization/EzSettingsStrings.cs | 2 +- .../Sections/Graphics/LayoutSettings.cs | 2 +- osu.Game/Rulesets/Ruleset.cs | 10 ++--- 13 files changed, 40 insertions(+), 46 deletions(-) diff --git a/osu.Game.Rulesets.Mania/LAsEzMania/Helper/CustomHitWindows.cs b/osu.Game.Rulesets.Mania/LAsEzMania/Helper/CustomHitWindows.cs index 8d5852c1b3..6f324e7f5e 100644 --- a/osu.Game.Rulesets.Mania/LAsEzMania/Helper/CustomHitWindows.cs +++ b/osu.Game.Rulesets.Mania/LAsEzMania/Helper/CustomHitWindows.cs @@ -191,7 +191,7 @@ namespace osu.Game.Rulesets.Mania.LAsEZMania.Helper double meh = Math.Floor(IBeatmapDifficultyInfo.DifficultyRange(OverallDifficulty, meh_window_range) * TotalMultiplier) + 0.5; double miss = Math.Floor(IBeatmapDifficultyInfo.DifficultyRange(OverallDifficulty, miss_window_range) * TotalMultiplier) + 0.5; double poor = miss; - SetRanges(perfect, great, good, ok, meh, miss, poor); + setRanges(perfect, great, good, ok, meh, miss, poor); break; case EzEnumHitMode.O2Jam: @@ -329,7 +329,7 @@ namespace osu.Game.Rulesets.Mania.LAsEZMania.Helper } } - private void SetRanges(double range305, double range300, double range200, double range100, double range050, double range000, double poorRange) + private void setRanges(double range305, double range300, double range200, double range100, double range050, double range000, double poorRange) { Range305 = range305; Range300 = range300; diff --git a/osu.Game.Rulesets.Mania/LAsEzMania/Mods/LAsMods/ManiaModPatternShift.cs b/osu.Game.Rulesets.Mania/LAsEzMania/Mods/LAsMods/ManiaModPatternShift.cs index 60fbf4898d..a9f7bcf048 100644 --- a/osu.Game.Rulesets.Mania/LAsEzMania/Mods/LAsMods/ManiaModPatternShift.cs +++ b/osu.Game.Rulesets.Mania/LAsEzMania/Mods/LAsMods/ManiaModPatternShift.cs @@ -489,7 +489,7 @@ namespace osu.Game.Rulesets.Mania.LAsEzMania.Mods.LAsMods } // In-place Cooley-Tukey FFT (radix-2) - private static void FFT(Complex[] buffer, bool inverse) + private static void fft(Complex[] buffer, bool inverse) { int n = buffer.Length; int bits = (int)Math.Log(n, 2); diff --git a/osu.Game.Rulesets.Mania/Scoring/ManiaHealthProcessor.cs b/osu.Game.Rulesets.Mania/Scoring/ManiaHealthProcessor.cs index 6d475c9bb0..d7407b14f3 100644 --- a/osu.Game.Rulesets.Mania/Scoring/ManiaHealthProcessor.cs +++ b/osu.Game.Rulesets.Mania/Scoring/ManiaHealthProcessor.cs @@ -32,9 +32,7 @@ namespace osu.Game.Rulesets.Mania.Scoring public ManiaHealthProcessor(double drainStartTime) : base(drainStartTime) { - if (GlobalConfigStore.EzConfig != null) - mode = GlobalConfigStore.EzConfig.Get(Ez2Setting.CustomHealthMode); - + mode = GlobalConfigStore.EzConfig.Get(Ez2Setting.CustomHealthMode); row = switchHealthMode(mode); } diff --git a/osu.Game.Rulesets.Mania/Skinning/Ez2/ManiaEz2SkinTransformer.cs b/osu.Game.Rulesets.Mania/Skinning/Ez2/ManiaEz2SkinTransformer.cs index dd174dd3fe..f54ad50076 100644 --- a/osu.Game.Rulesets.Mania/Skinning/Ez2/ManiaEz2SkinTransformer.cs +++ b/osu.Game.Rulesets.Mania/Skinning/Ez2/ManiaEz2SkinTransformer.cs @@ -38,7 +38,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2 // Logger.Log("!GlobalConfigStore.EzConfig Ez2Skin", LoggingTarget.Runtime, LogLevel.Important); // } - var ezSkinConfig1 = GlobalConfigStore.EzConfig!; + var ezSkinConfig1 = GlobalConfigStore.EzConfig; // this.ezSkinSettings = ezSkinSettings ?? throw new ArgumentNullException(nameof(ezSkinSettings)); columnWidthBindable = ezSkinConfig1.GetBindable(Ez2Setting.ColumnWidth); diff --git a/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/YuComFastSlowDisplay.cs b/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/YuComFastSlowDisplay.cs index be49e91c3a..1cbc4e1731 100644 --- a/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/YuComFastSlowDisplay.cs +++ b/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/YuComFastSlowDisplay.cs @@ -79,7 +79,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD public Bindable SlowText { get; } = new Bindable("Slow"); [SettingSource(typeof(FastSlowDisplayStrings), nameof(FastSlowDisplayStrings.FAST_COLOUR_STYLE), nameof(FastSlowDisplayStrings.FAST_COLOUR_STYLE_DESCRIPTION))] - public Bindable FastColourStyle { get; } = new Bindable(); + public Bindable FastColourStyle { get; } = new Bindable(); [SettingSource(typeof(FastSlowDisplayStrings), nameof(FastSlowDisplayStrings.FAST_COLOUR), nameof(FastSlowDisplayStrings.TEXT_COLOUR_DESCRIPTION))] public BindableColour4 FastColour { get; } = new BindableColour4(Colour4.FromHex("#97A5FF")); @@ -88,7 +88,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD public BindableColour4 FastColourGradient { get; } = new BindableColour4(Colour4.LightPink); [SettingSource(typeof(FastSlowDisplayStrings), nameof(FastSlowDisplayStrings.SLOW_COLOUR_STYLE), nameof(FastSlowDisplayStrings.SLOW_COLOUR_STYLE_DESCRIPTION))] - public Bindable SlowColourStyle { get; } = new Bindable(); + public Bindable SlowColourStyle { get; } = new Bindable(); [SettingSource(typeof(FastSlowDisplayStrings), nameof(FastSlowDisplayStrings.SLOW_COLOUR), nameof(FastSlowDisplayStrings.TEXT_COLOUR_DESCRIPTION))] public BindableColour4 SlowColour { get; } = new BindableColour4(Colour4.FromHex("#D1FF74")); @@ -119,7 +119,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD public BindableBool OnlyDisplayOne { get; } = new BindableBool(false); [SettingSource(typeof(FastSlowDisplayStrings), nameof(FastSlowDisplayStrings.SELECT_COLUMN), nameof(FastSlowDisplayStrings.SELECT_COLUMN_DESCRIPTION))] - public Bindable SelectColumn { get; } = new Bindable(); + public Bindable SelectColumn { get; } = new Bindable(); private Container textContainer = null!; private Container fast = null!; @@ -256,15 +256,15 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD FastColourStyle.BindValueChanged(e => { - if (e.NewValue == ColourStyle.SingleColour) + if (e.NewValue == YuColourStyle.SingleColour) { SetFastTextColour(FastColour.Value); } - else if (e.NewValue == ColourStyle.HorizontalGradient) + else if (e.NewValue == YuColourStyle.HorizontalGradient) { SetFastTextColour(FastColour.Value, FastColourGradient.Value); } - else if (e.NewValue == ColourStyle.VerticalGradient) + else if (e.NewValue == YuColourStyle.VerticalGradient) { SetFastTextColour(FastColour.Value, FastColourGradient.Value); } @@ -272,15 +272,15 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD SlowColourStyle.BindValueChanged(e => { - if (e.NewValue == ColourStyle.SingleColour) + if (e.NewValue == YuColourStyle.SingleColour) { SetSlowTextColour(SlowColour.Value); } - else if (e.NewValue == ColourStyle.HorizontalGradient) + else if (e.NewValue == YuColourStyle.HorizontalGradient) { SetSlowTextColour(SlowColour.Value, SlowColourGradient.Value); } - else if (e.NewValue == ColourStyle.VerticalGradient) + else if (e.NewValue == YuColourStyle.VerticalGradient) { SetSlowTextColour(SlowColour.Value, SlowColourGradient.Value); } @@ -427,15 +427,15 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD displayFastText.Colour = colour; - if (gradient != null && FastColourStyle.Value != ColourStyle.SingleColour) + if (gradient != null && FastColourStyle.Value != YuColourStyle.SingleColour) { FastColourGradient.Value = gradient.Value; - if (FastColourStyle.Value == ColourStyle.HorizontalGradient) + if (FastColourStyle.Value == YuColourStyle.HorizontalGradient) { displayFastText.Colour = ColourInfo.GradientHorizontal(colour, gradient.Value); } - else if (FastColourStyle.Value == ColourStyle.VerticalGradient) + else if (FastColourStyle.Value == YuColourStyle.VerticalGradient) { displayFastText.Colour = ColourInfo.GradientVertical(colour, gradient.Value); } @@ -447,15 +447,15 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD SlowColour.Value = colour; displaySlowText.Colour = colour; - if (gradient != null && FastColourStyle.Value != ColourStyle.SingleColour) + if (gradient != null && FastColourStyle.Value != YuColourStyle.SingleColour) { SlowColourGradient.Value = gradient.Value; - if (SlowColourStyle.Value == ColourStyle.HorizontalGradient) + if (SlowColourStyle.Value == YuColourStyle.HorizontalGradient) { displaySlowText.Colour = ColourInfo.GradientHorizontal(colour, gradient.Value); } - else if (SlowColourStyle.Value == ColourStyle.VerticalGradient) + else if (SlowColourStyle.Value == YuColourStyle.VerticalGradient) { displaySlowText.Colour = ColourInfo.GradientVertical(colour, gradient.Value); } @@ -507,11 +507,11 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD var legacyRuleset = (ILegacyRuleset)ruleset.Value.CreateInstance(); int keys = legacyRuleset.GetKeyCount(beatmap.Value.BeatmapInfo, mods.Value); - if (SelectColumn.Value == Column.Middle && keys / 2.0 != Math.Truncate(keys / 2.0) && column == (keys / 2) + 1) + if (SelectColumn.Value == YuColumnPosition.Middle && keys / 2.0 != Math.Truncate(keys / 2.0) && column == (keys / 2) + 1) { displayResult(judgement); } - else if (SelectColumn.Value == Column.RightHalf && column > keys / 2.0) + else if (SelectColumn.Value == YuColumnPosition.RightHalf && column > keys / 2.0) { if (keys % 2 != 0 && column > (keys / 2) + 1) { @@ -522,11 +522,11 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD displayResult(judgement); } } - else if (SelectColumn.Value == Column.LeftHalf && column <= keys / 2.0) + else if (SelectColumn.Value == YuColumnPosition.LeftHalf && column <= keys / 2.0) { displayResult(judgement); } - else if (column >= LowerColumnBound.Value && column <= UpperColumnBound.Value && SelectColumn.Value == Column.None) + else if (column >= LowerColumnBound.Value && column <= UpperColumnBound.Value && SelectColumn.Value == YuColumnPosition.None) { displayResult(judgement); } diff --git a/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/YuComFastSlowDisplay_Helper.cs b/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/YuComFastSlowDisplay_Helper.cs index 901eff9b65..43eb7ac4c0 100644 --- a/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/YuComFastSlowDisplay_Helper.cs +++ b/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/YuComFastSlowDisplay_Helper.cs @@ -8,7 +8,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD { public partial class YuComFastSlowDisplay { - public enum Column + public enum YuColumnPosition { [LocalisableDescription(typeof(FastSlowDisplayStrings), nameof(FastSlowDisplayStrings.NONE))] None, @@ -23,7 +23,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD Middle } - public enum ColourStyle + public enum YuColourStyle { [LocalisableDescription(typeof(FastSlowDisplayStrings), nameof(FastSlowDisplayStrings.SINGLE_COLOUR))] SingleColour, @@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD VerticalGradient } - public static class FastSlowDisplayStrings + protected static class FastSlowDisplayStrings { public static readonly LocalisableString SHOW_JUDGEMENT = new EzLocalizationManager.EzLocalisableString("判定", "Judgement"); public static readonly LocalisableString SHOW_STYLE_DESCRIPTION = new EzLocalizationManager.EzLocalisableString("何时显示快/慢", "When to show fast/slow."); diff --git a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzJudgementLine.cs b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzJudgementLine.cs index 0edf4df81b..23aa45baf9 100644 --- a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzJudgementLine.cs +++ b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzJudgementLine.cs @@ -27,10 +27,10 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro [Resolved] private Ez2ConfigManager ezSkinConfig { get; set; } = null!; - public EzJudgementLine() - { - // AddLayout(layout); - } + // public EzJudgementLine() + // { + // // AddLayout(layout); + // } [BackgroundDependencyLoader] private void load(IEzSkinInfo ezSkinInfo) diff --git a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/ManiaEzStyleProSkinTransformer.cs b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/ManiaEzStyleProSkinTransformer.cs index a8d505a12e..e550ce1581 100644 --- a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/ManiaEzStyleProSkinTransformer.cs +++ b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/ManiaEzStyleProSkinTransformer.cs @@ -36,7 +36,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro // Logger.Log("!GlobalConfigStore.EzConfig EzStyleProSkin", LoggingTarget.Runtime, LogLevel.Important); // } - ezSkinConfig = GlobalConfigStore.EzConfig!; + ezSkinConfig = GlobalConfigStore.EzConfig; columnWidthBindable = ezSkinConfig.GetBindable(Ez2Setting.ColumnWidth); specialFactorBindable = ezSkinConfig.GetBindable(Ez2Setting.SpecialFactor); diff --git a/osu.Game.Rulesets.Mania/Skinning/SbI/ManiaSbISkinTransformer.cs b/osu.Game.Rulesets.Mania/Skinning/SbI/ManiaSbISkinTransformer.cs index e5ca79c1e2..8c28fbbcc4 100644 --- a/osu.Game.Rulesets.Mania/Skinning/SbI/ManiaSbISkinTransformer.cs +++ b/osu.Game.Rulesets.Mania/Skinning/SbI/ManiaSbISkinTransformer.cs @@ -36,7 +36,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.SbI // Logger.Log("!GlobalConfigStore.EzConfig SbISkin", LoggingTarget.Runtime, LogLevel.Important); // } - ezSkinConfig = GlobalConfigStore.EzConfig!; + ezSkinConfig = GlobalConfigStore.EzConfig; columnWidthBindable = ezSkinConfig.GetBindable(Ez2Setting.ColumnWidth); specialFactorBindable = ezSkinConfig.GetBindable(Ez2Setting.SpecialFactor); hitPosition = ezSkinConfig.GetBindable(Ez2Setting.HitPosition); diff --git a/osu.Game/LAsEzExtensions/Audio/InputAudioLatencyTracker.cs b/osu.Game/LAsEzExtensions/Audio/InputAudioLatencyTracker.cs index eaff915ad0..3efdce0ac7 100644 --- a/osu.Game/LAsEzExtensions/Audio/InputAudioLatencyTracker.cs +++ b/osu.Game/LAsEzExtensions/Audio/InputAudioLatencyTracker.cs @@ -3,7 +3,6 @@ using System; using osu.Framework.Allocation; -using osu.Framework.Audio; using osu.Framework.Audio.EzLatency; using osu.Framework.Bindables; using osu.Framework.Graphics.Sprites; @@ -26,9 +25,6 @@ namespace osu.Game.LAsEzExtensions.Audio [Resolved(canBeNull: true)] private INotificationOverlay? notificationOverlay { get; set; } - [Resolved] - private AudioManager? audioManager { get; set; } - private Ez2ConfigManager ezConfig { get; set; } private ScoreProcessor? scoreProcessor; diff --git a/osu.Game/LAsEzExtensions/Localization/EzSettingsStrings.cs b/osu.Game/LAsEzExtensions/Localization/EzSettingsStrings.cs index 1bac5ff8ef..b5a09e2a59 100644 --- a/osu.Game/LAsEzExtensions/Localization/EzSettingsStrings.cs +++ b/osu.Game/LAsEzExtensions/Localization/EzSettingsStrings.cs @@ -9,7 +9,7 @@ namespace osu.Game.LAsEzExtensions.Localization { public static readonly EzLocalizationManager.EzLocalisableString SCALING_GAME_MODE = new EzLocalizationManager.EzLocalisableString("缩放游戏模式", "Scaling Game Mode"); - public static readonly EzLocalizationManager.EzLocalisableString ScalingGameModeTooltip = new EzLocalizationManager.EzLocalisableString( + public static readonly EzLocalizationManager.EzLocalisableString SCALING_GAME_MODE_TOOLTIP = new EzLocalizationManager.EzLocalisableString( "缩放游戏模式会根据当前游戏模式自动调整界面元素的大小。" + "\n开启后,界面元素会根据当前游戏模式进行缩放,以提供更适合的视觉体验。" + "\n例如,在Mania模式下,界面元素会缩小以适应更多的列数,而在其他模式下则保持默认大小。", diff --git a/osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs b/osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs index b9c5b7ec20..d98fd75364 100644 --- a/osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs @@ -184,7 +184,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics new SettingsItemV2(new FormEnumDropdown { Caption = EzSettingsStrings.SCALING_GAME_MODE, - HintText = EzSettingsStrings.ScalingGameModeTooltip, + HintText = EzSettingsStrings.SCALING_GAME_MODE_TOOLTIP, Current = ezConfig.GetBindable(Ez2Setting.ScalingGameMode), }) { diff --git a/osu.Game/Rulesets/Ruleset.cs b/osu.Game/Rulesets/Ruleset.cs index 9a4883abdd..f61badcad2 100644 --- a/osu.Game/Rulesets/Ruleset.cs +++ b/osu.Game/Rulesets/Ruleset.cs @@ -43,7 +43,7 @@ namespace osu.Game.Rulesets private static readonly ConcurrentDictionary mod_reference_cache = new ConcurrentDictionary(); - private Mod[]? cached_all_mods; + private Mod[]? cachedAllMods; /// /// Version history: @@ -66,7 +66,7 @@ namespace osu.Game.Rulesets /// /// A queryable source containing all available mods. /// Call for consumption purposes. - /// /// + /// public IEnumerable AllMods { get @@ -91,10 +91,10 @@ namespace osu.Game.Rulesets /// public IEnumerable CreateAllMods() { - if (cached_all_mods != null) - return cached_all_mods; + if (cachedAllMods != null) + return cachedAllMods; - return cached_all_mods = Enum.GetValues() + return cachedAllMods = Enum.GetValues() // Confine all mods of each mod type into a single IEnumerable .SelectMany(GetModsFor) // Filter out all null mods