Adjust various class naming and add some xmldoc

This commit is contained in:
Dean Herbert 2023-09-12 17:15:16 +09:00
parent 3da30485b2
commit 7e3652284d
6 changed files with 16 additions and 12 deletions

View File

@ -32,7 +32,7 @@ public partial class TestSceneModEffectPreviewPanel : OsuTestScene
private Container content = null!;
protected override Container<Drawable> 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,

View File

@ -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<Drawable> Container => Content;

View File

@ -25,7 +25,11 @@
namespace osu.Game.Overlays.Mods
{
public partial class ModEffectPreviewPanel : CompositeDrawable
/// <summary>
/// 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.
/// </summary>
public partial class BeatmapAttributesDisplay : CompositeDrawable
{
private Container content = null!;
private Container innerContent = null!;

View File

@ -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;

View File

@ -19,9 +19,9 @@
namespace osu.Game.Overlays.Mods
{
/// <summary>
/// Base class for displays of mods effects.
/// Base class for displays of singular counters. Not to be confused with <see cref="BeatmapAttributesDisplay"/> which aggregates multiple attributes.
/// </summary>
public abstract partial class ModsEffectDisplay : Container, IHasCurrentValue<double>
public abstract partial class ModCounterDisplay : Container, IHasCurrentValue<double>
{
public const float HEIGHT = 42;
private const float transition_duration = 200;
@ -57,7 +57,7 @@ public Bindable<double> Current
protected readonly RollingCounter<double> Counter;
protected ModsEffectDisplay()
protected ModCounterDisplay()
{
Height = HEIGHT;
AutoSizeAxes = Axes.X;

View File

@ -124,7 +124,7 @@ protected virtual IEnumerable<ShearedButton> 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,