diff --git a/osu.Game.Tests/Visual/TestCaseHistoricalSection.cs b/osu.Game.Tests/Visual/TestCaseHistoricalSection.cs index 7f991dc5a6..a1cb28bfef 100644 --- a/osu.Game.Tests/Visual/TestCaseHistoricalSection.cs +++ b/osu.Game.Tests/Visual/TestCaseHistoricalSection.cs @@ -15,7 +15,7 @@ namespace osu.Game.Tests.Visual { internal class TestCaseHistoricalSection : OsuTestCase { - public override IReadOnlyList RequiredTypes => new [] { typeof(HistoricalSection), typeof(PaginatedMostPlayedBeatmapContainer), typeof(MostPlayedBeatmapDrawable) }; + public override IReadOnlyList RequiredTypes => new [] { typeof(HistoricalSection), typeof(PaginatedMostPlayedBeatmapContainer), typeof(DrawableMostPlayedRow) }; public TestCaseHistoricalSection() { diff --git a/osu.Game/Overlays/Profile/Sections/BeatmapMetadataContainer.cs b/osu.Game/Overlays/Profile/Sections/BeatmapMetadataContainer.cs index 5104f98f9d..bfd8db5d9c 100644 --- a/osu.Game/Overlays/Profile/Sections/BeatmapMetadataContainer.cs +++ b/osu.Game/Overlays/Profile/Sections/BeatmapMetadataContainer.cs @@ -11,6 +11,9 @@ using osu.Game.Graphics.Containers; using osu.Game.Graphics.Sprites; namespace osu.Game.Overlays.Profile.Sections { + /// + /// Display artist/title/mapper information, commonly used as the left portion of a profile or score display row (see ). + /// public class BeatmapMetadataContainer : OsuHoverContainer, IHasTooltip { private readonly BeatmapInfo beatmap; diff --git a/osu.Game/Overlays/Profile/Sections/DrawableBeatmapRow.cs b/osu.Game/Overlays/Profile/Sections/DrawableProfileRow.cs similarity index 89% rename from osu.Game/Overlays/Profile/Sections/DrawableBeatmapRow.cs rename to osu.Game/Overlays/Profile/Sections/DrawableProfileRow.cs index 4d2affd77c..0607549f20 100644 --- a/osu.Game/Overlays/Profile/Sections/DrawableBeatmapRow.cs +++ b/osu.Game/Overlays/Profile/Sections/DrawableProfileRow.cs @@ -13,7 +13,7 @@ using OpenTK.Graphics; namespace osu.Game.Overlays.Profile.Sections { - public abstract class DrawableBeatmapRow : Container + public abstract class DrawableProfileRow : Container { private const int fade_duration = 200; @@ -21,14 +21,17 @@ namespace osu.Game.Overlays.Profile.Sections private readonly Box coloredBackground; private readonly Container background; - protected abstract Drawable CreatePicture(); + /// + /// A visual element displayed to the left of content. + /// + protected abstract Drawable CreateLeftVisual(); protected FillFlowContainer LeftFlowContainer { get; private set; } protected FillFlowContainer RightFlowContainer { get; private set; } protected override Container Content { get; } - protected DrawableBeatmapRow() + protected DrawableProfileRow() { RelativeSizeAxes = Axes.X; Height = 60; @@ -77,7 +80,7 @@ namespace osu.Game.Overlays.Profile.Sections Direction = FillDirection.Horizontal, Children = new[] { - CreatePicture(), + CreateLeftVisual(), LeftFlowContainer = new FillFlowContainer { RelativeSizeAxes = Axes.X, diff --git a/osu.Game/Overlays/Profile/Sections/Historical/MostPlayedBeatmapDrawable.cs b/osu.Game/Overlays/Profile/Sections/Historical/DrawableMostPlayedRow.cs similarity index 92% rename from osu.Game/Overlays/Profile/Sections/Historical/MostPlayedBeatmapDrawable.cs rename to osu.Game/Overlays/Profile/Sections/Historical/DrawableMostPlayedRow.cs index 446af667f2..0b5e376fd6 100644 --- a/osu.Game/Overlays/Profile/Sections/Historical/MostPlayedBeatmapDrawable.cs +++ b/osu.Game/Overlays/Profile/Sections/Historical/DrawableMostPlayedRow.cs @@ -14,19 +14,19 @@ using OpenTK.Graphics; namespace osu.Game.Overlays.Profile.Sections.Historical { - public class MostPlayedBeatmapDrawable : DrawableBeatmapRow + public class DrawableMostPlayedRow : DrawableProfileRow { private readonly BeatmapInfo beatmap; private readonly int playCount; private OsuHoverContainer mapperContainer; - public MostPlayedBeatmapDrawable(BeatmapInfo beatmap, int playCount) + public DrawableMostPlayedRow(BeatmapInfo beatmap, int playCount) { this.beatmap = beatmap; this.playCount = playCount; } - protected override Drawable CreatePicture() => new Container + protected override Drawable CreateLeftVisual() => new Container { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, diff --git a/osu.Game/Overlays/Profile/Sections/Historical/PaginatedMostPlayedBeatmapContainer.cs b/osu.Game/Overlays/Profile/Sections/Historical/PaginatedMostPlayedBeatmapContainer.cs index cec0e9a775..e54f012faf 100644 --- a/osu.Game/Overlays/Profile/Sections/Historical/PaginatedMostPlayedBeatmapContainer.cs +++ b/osu.Game/Overlays/Profile/Sections/Historical/PaginatedMostPlayedBeatmapContainer.cs @@ -41,7 +41,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical foreach (var beatmap in beatmaps) { - ItemsContainer.Add(new MostPlayedBeatmapDrawable(beatmap.GetBeatmapInfo(Rulesets), beatmap.PlayCount)); + ItemsContainer.Add(new DrawableMostPlayedRow(beatmap.GetBeatmapInfo(Rulesets), beatmap.PlayCount)); } }; diff --git a/osu.Game/Overlays/Profile/Sections/Ranks/DrawableScore.cs b/osu.Game/Overlays/Profile/Sections/Ranks/DrawableScore.cs index db7647ce0e..9fa828802a 100644 --- a/osu.Game/Overlays/Profile/Sections/Ranks/DrawableScore.cs +++ b/osu.Game/Overlays/Profile/Sections/Ranks/DrawableScore.cs @@ -14,7 +14,7 @@ using osu.Game.Rulesets.UI; namespace osu.Game.Overlays.Profile.Sections.Ranks { - public abstract class DrawableScore : DrawableBeatmapRow + public abstract class DrawableScore : DrawableProfileRow { private readonly FillFlowContainer metadata; private readonly ScoreModsContainer modsContainer; @@ -65,7 +65,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks modsContainer.Add(new ModIcon(mod) { Scale = new Vector2(0.5f) }); } - protected override Drawable CreatePicture() => new DrawableRank(Score.Rank) + protected override Drawable CreateLeftVisual() => new DrawableRank(Score.Rank) { RelativeSizeAxes = Axes.Y, Width = 60, diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 934eeafc03..0e93844de6 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -296,8 +296,8 @@ - - + +