diff --git a/osu.Game/Overlays/Mods/DifficultyMultiplierDisplay.cs b/osu.Game/Overlays/Mods/DifficultyMultiplierDisplay.cs index 3c14e3aa60..7d0f9f1b31 100644 --- a/osu.Game/Overlays/Mods/DifficultyMultiplierDisplay.cs +++ b/osu.Game/Overlays/Mods/DifficultyMultiplierDisplay.cs @@ -21,7 +21,7 @@ using osuTK; namespace osu.Game.Overlays.Mods { /// - /// Base class for displays of singular counters. Not to be confused with which aggregates multiple attributes. + /// On the mod select overlay, this provides a local updating view of the aggregate score multiplier coming from mods. /// public partial class DifficultyMultiplierDisplay : Container, IHasCurrentValue { @@ -46,16 +46,7 @@ namespace osu.Game.Overlays.Mods [Resolved] private OverlayColourProvider colourProvider { get; set; } = null!; - /// - /// Text to display in the left area of the display. - /// - protected LocalisableString Label => DifficultyMultiplierDisplayStrings.DifficultyMultiplier; - - protected virtual string CounterFormat => @"0.0x"; - - protected override Container Content => content; - - protected readonly RollingCounter Counter; + private readonly RollingCounter counter; private readonly InputBlockingContainer topContent; @@ -115,7 +106,7 @@ namespace osu.Game.Overlays.Mods Origin = Anchor.Centre, Margin = new MarginPadding { Horizontal = 18 }, Shear = new Vector2(-shear, 0), - Text = Label, + Text = DifficultyMultiplierDisplayStrings.DifficultyMultiplier, Font = OsuFont.Default.With(size: 17, weight: FontWeight.SemiBold) } } @@ -128,7 +119,7 @@ namespace osu.Game.Overlays.Mods Direction = FillDirection.Horizontal, Shear = new Vector2(-shear, 0), Spacing = new Vector2(2, 0), - Child = Counter = new EffectCounter(CounterFormat) + Child = counter = new EffectCounter(@"0.0x") { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, @@ -155,13 +146,13 @@ namespace osu.Game.Overlays.Mods { Current.BindValueChanged(e => { - var effect = CalculateEffectForComparison(e.NewValue.CompareTo(Current.Default)); + var effect = calculateEffectForComparison(e.NewValue.CompareTo(Current.Default)); setColours(effect); }, true); // required to prevent the counter initially rolling up from 0 to 1 // due to `Current.Value` having a nonstandard default value of 1. - Counter.SetCountWithoutRolling(Current.Value); + counter.SetCountWithoutRolling(Current.Value); } /// @@ -197,7 +188,7 @@ namespace osu.Game.Overlays.Mods /// /// Value to convert. Will arrive from comparison between bindable once it changes and it's . /// Effect of the value. - protected virtual ModEffect CalculateEffectForComparison(int comparison) + private static ModEffect calculateEffectForComparison(int comparison) { if (comparison == 0) return ModEffect.NotChanged;