diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneModEffectPreviewPanel.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneModEffectPreviewPanel.cs index adb12ad249..b3ad5a499e 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestSceneModEffectPreviewPanel.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneModEffectPreviewPanel.cs @@ -32,7 +32,7 @@ public partial class TestSceneModEffectPreviewPanel : OsuTestScene private Container content = null!; protected override Container Content => content; - private ModEffectPreviewPanel panel = null!; + private BeatmapAttributesDisplay panel = null!; [BackgroundDependencyLoader] private void load() @@ -53,7 +53,7 @@ public void TestDisplay() OsuModDifficultyAdjust difficultyAdjust = new OsuModDifficultyAdjust(); OsuModDoubleTime doubleTime = new OsuModDoubleTime(); - AddStep("create display", () => Child = panel = new ModEffectPreviewPanel + AddStep("create display", () => Child = panel = new BeatmapAttributesDisplay { Anchor = Anchor.Centre, Origin = Anchor.Centre, diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneModsEffectDisplay.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneModsEffectDisplay.cs index a1c8bef1de..bf6a718167 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestSceneModsEffectDisplay.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneModsEffectDisplay.cs @@ -53,7 +53,7 @@ public void TestModsEffectDisplay() AddUntilStep("colours are correct", () => testDisplay.Container.Colour == colourProvider.Background5 && background.Colour == colours.ForModType(ModType.DifficultyIncrease)); } - private partial class TestDisplay : ModsEffectDisplay + private partial class TestDisplay : ModCounterDisplay { public Container Container => Content; diff --git a/osu.Game/Overlays/Mods/ModEffectPreviewPanel.cs b/osu.Game/Overlays/Mods/BeatmapAttributesDisplay.cs similarity index 97% rename from osu.Game/Overlays/Mods/ModEffectPreviewPanel.cs rename to osu.Game/Overlays/Mods/BeatmapAttributesDisplay.cs index c961235cb2..2aea53090a 100644 --- a/osu.Game/Overlays/Mods/ModEffectPreviewPanel.cs +++ b/osu.Game/Overlays/Mods/BeatmapAttributesDisplay.cs @@ -25,7 +25,11 @@ namespace osu.Game.Overlays.Mods { - public partial class ModEffectPreviewPanel : CompositeDrawable + /// + /// On the mod select overlay, this provides a local updating view of BPM, star rating and other + /// difficulty attributes so the user can have a better insight into what mods are changing. + /// + public partial class BeatmapAttributesDisplay : CompositeDrawable { private Container content = null!; private Container innerContent = null!; diff --git a/osu.Game/Overlays/Mods/DifficultyMultiplierDisplay.cs b/osu.Game/Overlays/Mods/DifficultyMultiplierDisplay.cs index 9e16aa926f..9f4d187879 100644 --- a/osu.Game/Overlays/Mods/DifficultyMultiplierDisplay.cs +++ b/osu.Game/Overlays/Mods/DifficultyMultiplierDisplay.cs @@ -9,7 +9,7 @@ namespace osu.Game.Overlays.Mods { - public sealed partial class DifficultyMultiplierDisplay : ModsEffectDisplay + public sealed partial class DifficultyMultiplierDisplay : ModCounterDisplay { protected override LocalisableString Label => DifficultyMultiplierDisplayStrings.DifficultyMultiplier; diff --git a/osu.Game/Overlays/Mods/ModsEffectDisplay.cs b/osu.Game/Overlays/Mods/ModCounterDisplay.cs similarity index 97% rename from osu.Game/Overlays/Mods/ModsEffectDisplay.cs rename to osu.Game/Overlays/Mods/ModCounterDisplay.cs index 3f31736ee1..3bec27d290 100644 --- a/osu.Game/Overlays/Mods/ModsEffectDisplay.cs +++ b/osu.Game/Overlays/Mods/ModCounterDisplay.cs @@ -19,9 +19,9 @@ namespace osu.Game.Overlays.Mods { /// - /// Base class for displays of mods effects. + /// Base class for displays of singular counters. Not to be confused with which aggregates multiple attributes. /// - public abstract partial class ModsEffectDisplay : Container, IHasCurrentValue + public abstract partial class ModCounterDisplay : Container, IHasCurrentValue { public const float HEIGHT = 42; private const float transition_duration = 200; @@ -57,7 +57,7 @@ public Bindable Current protected readonly RollingCounter Counter; - protected ModsEffectDisplay() + protected ModCounterDisplay() { Height = HEIGHT; AutoSizeAxes = Axes.X; diff --git a/osu.Game/Overlays/Mods/ModSelectOverlay.cs b/osu.Game/Overlays/Mods/ModSelectOverlay.cs index 242f883068..666e2849e8 100644 --- a/osu.Game/Overlays/Mods/ModSelectOverlay.cs +++ b/osu.Game/Overlays/Mods/ModSelectOverlay.cs @@ -124,7 +124,7 @@ protected virtual IEnumerable CreateFooterButtons() private Container aboveColumnsContent = null!; private DifficultyMultiplierDisplay? multiplierDisplay; - private ModEffectPreviewPanel? modEffectPreviewPanel; + private BeatmapAttributesDisplay? modEffectPreviewPanel; protected ShearedButton BackButton { get; private set; } = null!; protected ShearedToggleButton? CustomisationButton { get; private set; } @@ -181,7 +181,7 @@ private void load(OsuGameBase game, OsuColour colours, AudioManager audio) aboveColumnsContent = new Container { RelativeSizeAxes = Axes.X, - Height = ModsEffectDisplay.HEIGHT, + Height = ModCounterDisplay.HEIGHT, Padding = new MarginPadding { Horizontal = 100 }, Child = SearchTextBox = new ShearedSearchTextBox { @@ -196,7 +196,7 @@ private void load(OsuGameBase game, OsuColour colours, AudioManager audio) { Padding = new MarginPadding { - Top = ModsEffectDisplay.HEIGHT + PADDING, + Top = ModCounterDisplay.HEIGHT + PADDING, Bottom = PADDING }, RelativeSizeAxes = Axes.Both, @@ -257,7 +257,7 @@ private void load(OsuGameBase game, OsuColour colours, AudioManager audio) Origin = Anchor.TopRight }); - FooterContent.Add(modEffectPreviewPanel = new ModEffectPreviewPanel + FooterContent.Add(modEffectPreviewPanel = new BeatmapAttributesDisplay { Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight,