mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 20:12:57 +08:00
Use more sensible names for classes and methods
Adds xmldoc in places too.
This commit is contained in:
parent
507d0e3252
commit
98ce856de1
@ -15,7 +15,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
{
|
{
|
||||||
internal class TestCaseHistoricalSection : OsuTestCase
|
internal class TestCaseHistoricalSection : OsuTestCase
|
||||||
{
|
{
|
||||||
public override IReadOnlyList<Type> RequiredTypes => new [] { typeof(HistoricalSection), typeof(PaginatedMostPlayedBeatmapContainer), typeof(MostPlayedBeatmapDrawable) };
|
public override IReadOnlyList<Type> RequiredTypes => new [] { typeof(HistoricalSection), typeof(PaginatedMostPlayedBeatmapContainer), typeof(DrawableMostPlayedRow) };
|
||||||
|
|
||||||
public TestCaseHistoricalSection()
|
public TestCaseHistoricalSection()
|
||||||
{
|
{
|
||||||
|
@ -11,6 +11,9 @@ using osu.Game.Graphics.Containers;
|
|||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
namespace osu.Game.Overlays.Profile.Sections
|
namespace osu.Game.Overlays.Profile.Sections
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Display artist/title/mapper information, commonly used as the left portion of a profile or score display row (see <see cref="DrawableProfileRow"/>).
|
||||||
|
/// </summary>
|
||||||
public class BeatmapMetadataContainer : OsuHoverContainer, IHasTooltip
|
public class BeatmapMetadataContainer : OsuHoverContainer, IHasTooltip
|
||||||
{
|
{
|
||||||
private readonly BeatmapInfo beatmap;
|
private readonly BeatmapInfo beatmap;
|
||||||
|
@ -13,7 +13,7 @@ using OpenTK.Graphics;
|
|||||||
|
|
||||||
namespace osu.Game.Overlays.Profile.Sections
|
namespace osu.Game.Overlays.Profile.Sections
|
||||||
{
|
{
|
||||||
public abstract class DrawableBeatmapRow : Container
|
public abstract class DrawableProfileRow : Container
|
||||||
{
|
{
|
||||||
private const int fade_duration = 200;
|
private const int fade_duration = 200;
|
||||||
|
|
||||||
@ -21,14 +21,17 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
private readonly Box coloredBackground;
|
private readonly Box coloredBackground;
|
||||||
private readonly Container background;
|
private readonly Container background;
|
||||||
|
|
||||||
protected abstract Drawable CreatePicture();
|
/// <summary>
|
||||||
|
/// A visual element displayed to the left of <see cref="LeftFlowContainer"/> content.
|
||||||
|
/// </summary>
|
||||||
|
protected abstract Drawable CreateLeftVisual();
|
||||||
|
|
||||||
protected FillFlowContainer LeftFlowContainer { get; private set; }
|
protected FillFlowContainer LeftFlowContainer { get; private set; }
|
||||||
protected FillFlowContainer RightFlowContainer { get; private set; }
|
protected FillFlowContainer RightFlowContainer { get; private set; }
|
||||||
|
|
||||||
protected override Container<Drawable> Content { get; }
|
protected override Container<Drawable> Content { get; }
|
||||||
|
|
||||||
protected DrawableBeatmapRow()
|
protected DrawableProfileRow()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Height = 60;
|
Height = 60;
|
||||||
@ -77,7 +80,7 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
Direction = FillDirection.Horizontal,
|
Direction = FillDirection.Horizontal,
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
CreatePicture(),
|
CreateLeftVisual(),
|
||||||
LeftFlowContainer = new FillFlowContainer
|
LeftFlowContainer = new FillFlowContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
@ -14,19 +14,19 @@ using OpenTK.Graphics;
|
|||||||
|
|
||||||
namespace osu.Game.Overlays.Profile.Sections.Historical
|
namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||||
{
|
{
|
||||||
public class MostPlayedBeatmapDrawable : DrawableBeatmapRow
|
public class DrawableMostPlayedRow : DrawableProfileRow
|
||||||
{
|
{
|
||||||
private readonly BeatmapInfo beatmap;
|
private readonly BeatmapInfo beatmap;
|
||||||
private readonly int playCount;
|
private readonly int playCount;
|
||||||
private OsuHoverContainer mapperContainer;
|
private OsuHoverContainer mapperContainer;
|
||||||
|
|
||||||
public MostPlayedBeatmapDrawable(BeatmapInfo beatmap, int playCount)
|
public DrawableMostPlayedRow(BeatmapInfo beatmap, int playCount)
|
||||||
{
|
{
|
||||||
this.beatmap = beatmap;
|
this.beatmap = beatmap;
|
||||||
this.playCount = playCount;
|
this.playCount = playCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Drawable CreatePicture() => new Container
|
protected override Drawable CreateLeftVisual() => new Container
|
||||||
{
|
{
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
@ -41,7 +41,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
|||||||
|
|
||||||
foreach (var beatmap in beatmaps)
|
foreach (var beatmap in beatmaps)
|
||||||
{
|
{
|
||||||
ItemsContainer.Add(new MostPlayedBeatmapDrawable(beatmap.GetBeatmapInfo(Rulesets), beatmap.PlayCount));
|
ItemsContainer.Add(new DrawableMostPlayedRow(beatmap.GetBeatmapInfo(Rulesets), beatmap.PlayCount));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ using osu.Game.Rulesets.UI;
|
|||||||
|
|
||||||
namespace osu.Game.Overlays.Profile.Sections.Ranks
|
namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||||
{
|
{
|
||||||
public abstract class DrawableScore : DrawableBeatmapRow
|
public abstract class DrawableScore : DrawableProfileRow
|
||||||
{
|
{
|
||||||
private readonly FillFlowContainer metadata;
|
private readonly FillFlowContainer metadata;
|
||||||
private readonly ScoreModsContainer modsContainer;
|
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) });
|
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,
|
RelativeSizeAxes = Axes.Y,
|
||||||
Width = 60,
|
Width = 60,
|
||||||
|
@ -296,8 +296,8 @@
|
|||||||
<Compile Include="Online\API\Requests\GetUserBeatmapsRequest.cs" />
|
<Compile Include="Online\API\Requests\GetUserBeatmapsRequest.cs" />
|
||||||
<Compile Include="Overlays\Profile\Sections\BeatmapMetadataContainer.cs" />
|
<Compile Include="Overlays\Profile\Sections\BeatmapMetadataContainer.cs" />
|
||||||
<Compile Include="Overlays\Profile\Sections\Beatmaps\PaginatedBeatmapContainer.cs" />
|
<Compile Include="Overlays\Profile\Sections\Beatmaps\PaginatedBeatmapContainer.cs" />
|
||||||
<Compile Include="Overlays\Profile\Sections\DrawableBeatmapRow.cs" />
|
<Compile Include="Overlays\Profile\Sections\DrawableProfileRow.cs" />
|
||||||
<Compile Include="Overlays\Profile\Sections\Historical\MostPlayedBeatmapDrawable.cs" />
|
<Compile Include="Overlays\Profile\Sections\Historical\DrawableMostPlayedRow.cs" />
|
||||||
<Compile Include="Overlays\Profile\Sections\Historical\PaginatedMostPlayedBeatmapContainer.cs" />
|
<Compile Include="Overlays\Profile\Sections\Historical\PaginatedMostPlayedBeatmapContainer.cs" />
|
||||||
<Compile Include="Overlays\Profile\Sections\Kudosu\KudosuInfo.cs" />
|
<Compile Include="Overlays\Profile\Sections\Kudosu\KudosuInfo.cs" />
|
||||||
<Compile Include="Overlays\Profile\Sections\PaginatedContainer.cs" />
|
<Compile Include="Overlays\Profile\Sections\PaginatedContainer.cs" />
|
||||||
|
Loading…
Reference in New Issue
Block a user