1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 17:32:54 +08:00

Rename panels

This commit is contained in:
Dean Herbert 2020-04-21 20:55:33 +09:00
parent 9b9b710ded
commit ed9663985b
7 changed files with 16 additions and 16 deletions

View File

@ -20,8 +20,8 @@ namespace osu.Game.Tests.Visual.Online
{ {
public override IReadOnlyList<Type> RequiredTypes => new[] public override IReadOnlyList<Type> RequiredTypes => new[]
{ {
typeof(BeatmapPanelGrid), typeof(GridBeatmapPanel),
typeof(BeatmapPanelList), typeof(ListBeatmapPanel),
typeof(IconPill) typeof(IconPill)
}; };
@ -126,12 +126,12 @@ namespace osu.Game.Tests.Visual.Online
Spacing = new Vector2(5, 20), Spacing = new Vector2(5, 20),
Children = new Drawable[] Children = new Drawable[]
{ {
new BeatmapPanelGrid(normal), new GridBeatmapPanel(normal),
new BeatmapPanelGrid(undownloadable), new GridBeatmapPanel(undownloadable),
new BeatmapPanelGrid(manyDifficulties), new GridBeatmapPanel(manyDifficulties),
new BeatmapPanelList(normal), new ListBeatmapPanel(normal),
new BeatmapPanelList(undownloadable), new ListBeatmapPanel(undownloadable),
new BeatmapPanelList(manyDifficulties), new ListBeatmapPanel(manyDifficulties),
}, },
}, },
}; };

View File

@ -148,7 +148,7 @@ namespace osu.Game.Overlays.BeatmapListing.Panels
if (SetInfo.Beatmaps.Count > maximum_difficulty_icons) if (SetInfo.Beatmaps.Count > maximum_difficulty_icons)
{ {
foreach (var ruleset in SetInfo.Beatmaps.Select(b => b.Ruleset).Distinct()) foreach (var ruleset in SetInfo.Beatmaps.Select(b => b.Ruleset).Distinct())
icons.Add(new GroupedDifficultyIcon(SetInfo.Beatmaps.FindAll(b => b.Ruleset.Equals(ruleset)), ruleset, this is BeatmapPanelList ? Color4.White : colours.Gray5)); icons.Add(new GroupedDifficultyIcon(SetInfo.Beatmaps.FindAll(b => b.Ruleset.Equals(ruleset)), ruleset, this is ListBeatmapPanel ? Color4.White : colours.Gray5));
} }
else else
{ {

View File

@ -19,7 +19,7 @@ using osuTK.Graphics;
namespace osu.Game.Overlays.BeatmapListing.Panels namespace osu.Game.Overlays.BeatmapListing.Panels
{ {
public class BeatmapPanelGrid : BeatmapPanel public class GridBeatmapPanel : BeatmapPanel
{ {
private const float horizontal_padding = 10; private const float horizontal_padding = 10;
private const float vertical_padding = 5; private const float vertical_padding = 5;
@ -31,7 +31,7 @@ namespace osu.Game.Overlays.BeatmapListing.Panels
protected override PlayButton PlayButton => playButton; protected override PlayButton PlayButton => playButton;
protected override Box PreviewBar => progressBar; protected override Box PreviewBar => progressBar;
public BeatmapPanelGrid(BeatmapSetInfo beatmap) public GridBeatmapPanel(BeatmapSetInfo beatmap)
: base(beatmap) : base(beatmap)
{ {
Width = 380; Width = 380;

View File

@ -19,7 +19,7 @@ using osuTK.Graphics;
namespace osu.Game.Overlays.BeatmapListing.Panels namespace osu.Game.Overlays.BeatmapListing.Panels
{ {
public class BeatmapPanelList : BeatmapPanel public class ListBeatmapPanel : BeatmapPanel
{ {
private const float transition_duration = 120; private const float transition_duration = 120;
private const float horizontal_padding = 10; private const float horizontal_padding = 10;
@ -36,7 +36,7 @@ namespace osu.Game.Overlays.BeatmapListing.Panels
protected override PlayButton PlayButton => playButton; protected override PlayButton PlayButton => playButton;
protected override Box PreviewBar => progressBar; protected override Box PreviewBar => progressBar;
public BeatmapPanelList(BeatmapSetInfo beatmap) public ListBeatmapPanel(BeatmapSetInfo beatmap)
: base(beatmap) : base(beatmap)
{ {
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;

View File

@ -125,7 +125,7 @@ namespace osu.Game.Overlays
Spacing = new Vector2(10), Spacing = new Vector2(10),
Alpha = 0, Alpha = 0,
Margin = new MarginPadding { Vertical = 15 }, Margin = new MarginPadding { Vertical = 15 },
ChildrenEnumerable = beatmaps.Select<BeatmapSetInfo, BeatmapPanel>(b => new BeatmapPanelGrid(b) ChildrenEnumerable = beatmaps.Select<BeatmapSetInfo, BeatmapPanel>(b => new GridBeatmapPanel(b)
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,

View File

@ -33,7 +33,7 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps
protected override Drawable CreateDrawableItem(APIBeatmapSet model) => !model.OnlineBeatmapSetID.HasValue protected override Drawable CreateDrawableItem(APIBeatmapSet model) => !model.OnlineBeatmapSetID.HasValue
? null ? null
: new BeatmapPanelGrid(model.ToBeatmapSet(Rulesets)) : new GridBeatmapPanel(model.ToBeatmapSet(Rulesets))
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,

View File

@ -140,7 +140,7 @@ namespace osu.Game.Overlays.Rankings
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Spacing = new Vector2(10), Spacing = new Vector2(10),
Children = response.BeatmapSets.Select(b => new BeatmapPanelGrid(b.ToBeatmapSet(rulesets)) Children = response.BeatmapSets.Select(b => new GridBeatmapPanel(b.ToBeatmapSet(rulesets))
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,