mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 17:13:06 +08:00
Adjust various class naming and add some xmldoc
This commit is contained in:
parent
3da30485b2
commit
7e3652284d
@ -32,7 +32,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
private Container content = null!;
|
private Container content = null!;
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
private ModEffectPreviewPanel panel = null!;
|
private BeatmapAttributesDisplay panel = null!;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
@ -53,7 +53,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
OsuModDifficultyAdjust difficultyAdjust = new OsuModDifficultyAdjust();
|
OsuModDifficultyAdjust difficultyAdjust = new OsuModDifficultyAdjust();
|
||||||
OsuModDoubleTime doubleTime = new OsuModDoubleTime();
|
OsuModDoubleTime doubleTime = new OsuModDoubleTime();
|
||||||
|
|
||||||
AddStep("create display", () => Child = panel = new ModEffectPreviewPanel
|
AddStep("create display", () => Child = panel = new BeatmapAttributesDisplay
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
|
@ -53,7 +53,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
AddUntilStep("colours are correct", () => testDisplay.Container.Colour == colourProvider.Background5 && background.Colour == colours.ForModType(ModType.DifficultyIncrease));
|
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;
|
public Container<Drawable> Container => Content;
|
||||||
|
|
||||||
|
@ -25,7 +25,11 @@ using osu.Game.Configuration;
|
|||||||
|
|
||||||
namespace osu.Game.Overlays.Mods
|
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 content = null!;
|
||||||
private Container innerContent = null!;
|
private Container innerContent = null!;
|
@ -9,7 +9,7 @@ using osu.Game.Localisation;
|
|||||||
|
|
||||||
namespace osu.Game.Overlays.Mods
|
namespace osu.Game.Overlays.Mods
|
||||||
{
|
{
|
||||||
public sealed partial class DifficultyMultiplierDisplay : ModsEffectDisplay
|
public sealed partial class DifficultyMultiplierDisplay : ModCounterDisplay
|
||||||
{
|
{
|
||||||
protected override LocalisableString Label => DifficultyMultiplierDisplayStrings.DifficultyMultiplier;
|
protected override LocalisableString Label => DifficultyMultiplierDisplayStrings.DifficultyMultiplier;
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@ using osuTK;
|
|||||||
namespace osu.Game.Overlays.Mods
|
namespace osu.Game.Overlays.Mods
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public abstract partial class ModsEffectDisplay : Container, IHasCurrentValue<double>
|
public abstract partial class ModCounterDisplay : Container, IHasCurrentValue<double>
|
||||||
{
|
{
|
||||||
public const float HEIGHT = 42;
|
public const float HEIGHT = 42;
|
||||||
private const float transition_duration = 200;
|
private const float transition_duration = 200;
|
||||||
@ -57,7 +57,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
|
|
||||||
protected readonly RollingCounter<double> Counter;
|
protected readonly RollingCounter<double> Counter;
|
||||||
|
|
||||||
protected ModsEffectDisplay()
|
protected ModCounterDisplay()
|
||||||
{
|
{
|
||||||
Height = HEIGHT;
|
Height = HEIGHT;
|
||||||
AutoSizeAxes = Axes.X;
|
AutoSizeAxes = Axes.X;
|
@ -124,7 +124,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
|
|
||||||
private Container aboveColumnsContent = null!;
|
private Container aboveColumnsContent = null!;
|
||||||
private DifficultyMultiplierDisplay? multiplierDisplay;
|
private DifficultyMultiplierDisplay? multiplierDisplay;
|
||||||
private ModEffectPreviewPanel? modEffectPreviewPanel;
|
private BeatmapAttributesDisplay? modEffectPreviewPanel;
|
||||||
|
|
||||||
protected ShearedButton BackButton { get; private set; } = null!;
|
protected ShearedButton BackButton { get; private set; } = null!;
|
||||||
protected ShearedToggleButton? CustomisationButton { get; private set; }
|
protected ShearedToggleButton? CustomisationButton { get; private set; }
|
||||||
@ -181,7 +181,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
aboveColumnsContent = new Container
|
aboveColumnsContent = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Height = ModsEffectDisplay.HEIGHT,
|
Height = ModCounterDisplay.HEIGHT,
|
||||||
Padding = new MarginPadding { Horizontal = 100 },
|
Padding = new MarginPadding { Horizontal = 100 },
|
||||||
Child = SearchTextBox = new ShearedSearchTextBox
|
Child = SearchTextBox = new ShearedSearchTextBox
|
||||||
{
|
{
|
||||||
@ -196,7 +196,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
{
|
{
|
||||||
Padding = new MarginPadding
|
Padding = new MarginPadding
|
||||||
{
|
{
|
||||||
Top = ModsEffectDisplay.HEIGHT + PADDING,
|
Top = ModCounterDisplay.HEIGHT + PADDING,
|
||||||
Bottom = PADDING
|
Bottom = PADDING
|
||||||
},
|
},
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -257,7 +257,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
Origin = Anchor.TopRight
|
Origin = Anchor.TopRight
|
||||||
});
|
});
|
||||||
|
|
||||||
FooterContent.Add(modEffectPreviewPanel = new ModEffectPreviewPanel
|
FooterContent.Add(modEffectPreviewPanel = new BeatmapAttributesDisplay
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomRight,
|
Anchor = Anchor.BottomRight,
|
||||||
Origin = Anchor.BottomRight,
|
Origin = Anchor.BottomRight,
|
||||||
|
Loading…
Reference in New Issue
Block a user