Move and rename remaining direct classes

This commit is contained in:
Dean Herbert
2020-04-21 16:03:18 +09:00
parent 1cec0575b7
commit 9b9b710ded
18 changed files with 56 additions and 63 deletions

View File

@ -9,7 +9,7 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Online; using osu.Game.Online;
using osu.Game.Overlays.Direct; using osu.Game.Overlays.BeatmapListing.Panels;
using osu.Game.Rulesets.Osu; using osu.Game.Rulesets.Osu;
using osu.Game.Tests.Resources; using osu.Game.Tests.Resources;
using osuTK; using osuTK;
@ -20,7 +20,7 @@ namespace osu.Game.Tests.Visual.Online
{ {
public override IReadOnlyList<Type> RequiredTypes => new[] public override IReadOnlyList<Type> RequiredTypes => new[]
{ {
typeof(PanelDownloadButton) typeof(BeatmapPanelDownloadButton)
}; };
private TestDownloadButton downloadButton; private TestDownloadButton downloadButton;
@ -143,7 +143,7 @@ namespace osu.Game.Tests.Visual.Online
return beatmap; return beatmap;
} }
private class TestDownloadButton : PanelDownloadButton private class TestDownloadButton : BeatmapPanelDownloadButton
{ {
public new bool DownloadEnabled => base.DownloadEnabled; public new bool DownloadEnabled => base.DownloadEnabled;

View File

@ -8,7 +8,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Game.Audio; using osu.Game.Audio;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Overlays.Direct; using osu.Game.Overlays.BeatmapListing.Panels;
using osu.Game.Rulesets; using osu.Game.Rulesets;
using osu.Game.Users; using osu.Game.Users;
using osuTK; using osuTK;
@ -20,8 +20,8 @@ namespace osu.Game.Tests.Visual.Online
{ {
public override IReadOnlyList<Type> RequiredTypes => new[] public override IReadOnlyList<Type> RequiredTypes => new[]
{ {
typeof(DirectGridPanel), typeof(BeatmapPanelGrid),
typeof(DirectListPanel), typeof(BeatmapPanelList),
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 DirectGridPanel(normal), new BeatmapPanelGrid(normal),
new DirectGridPanel(undownloadable), new BeatmapPanelGrid(undownloadable),
new DirectGridPanel(manyDifficulties), new BeatmapPanelGrid(manyDifficulties),
new DirectListPanel(normal), new BeatmapPanelList(normal),
new DirectListPanel(undownloadable), new BeatmapPanelList(undownloadable),
new DirectListPanel(manyDifficulties), new BeatmapPanelList(manyDifficulties),
}, },
}, },
}; };

View File

@ -47,15 +47,8 @@ namespace osu.Game.Tests.Visual
typeof(IdleTracker), typeof(IdleTracker),
typeof(OnScreenDisplay), typeof(OnScreenDisplay),
typeof(NotificationOverlay), typeof(NotificationOverlay),
<<<<<<< HEAD typeof(BeatmapListingOverlay),
typeof(DirectOverlay),
typeof(DashboardOverlay), typeof(DashboardOverlay),
||||||| parent of 96a3a08a9... Remove unused classes and replace overlay in game
typeof(DirectOverlay),
typeof(SocialOverlay),
=======
typeof(SocialOverlay),
>>>>>>> 96a3a08a9... Remove unused classes and replace overlay in game
typeof(ChannelManager), typeof(ChannelManager),
typeof(ChatOverlay), typeof(ChatOverlay),
typeof(SettingsOverlay), typeof(SettingsOverlay),

View File

@ -5,7 +5,7 @@ using osu.Framework.Bindables;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Online; using osu.Game.Online;
namespace osu.Game.Overlays.Direct namespace osu.Game.Overlays
{ {
public abstract class BeatmapDownloadTrackingComposite : DownloadTrackingComposite<BeatmapSetInfo, BeatmapManager> public abstract class BeatmapDownloadTrackingComposite : DownloadTrackingComposite<BeatmapSetInfo, BeatmapManager>
{ {

View File

@ -26,9 +26,9 @@ using osu.Game.Graphics.UserInterface;
using osuTK; using osuTK;
using osuTK.Graphics; using osuTK.Graphics;
namespace osu.Game.Overlays.Direct namespace osu.Game.Overlays.BeatmapListing.Panels
{ {
public abstract class DirectPanel : OsuClickableContainer, IHasContextMenu public abstract class BeatmapPanel : OsuClickableContainer, IHasContextMenu
{ {
public readonly BeatmapSetInfo SetInfo; public readonly BeatmapSetInfo SetInfo;
@ -49,7 +49,7 @@ namespace osu.Game.Overlays.Direct
protected Action ViewBeatmap; protected Action ViewBeatmap;
protected DirectPanel(BeatmapSetInfo setInfo) protected BeatmapPanel(BeatmapSetInfo setInfo)
{ {
Debug.Assert(setInfo.OnlineBeatmapSetID != null); Debug.Assert(setInfo.OnlineBeatmapSetID != null);
@ -148,7 +148,7 @@ namespace osu.Game.Overlays.Direct
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 DirectListPanel ? Color4.White : colours.Gray5)); icons.Add(new GroupedDifficultyIcon(SetInfo.Beatmaps.FindAll(b => b.Ruleset.Equals(ruleset)), ruleset, this is BeatmapPanelList ? Color4.White : colours.Gray5));
} }
else else
{ {

View File

@ -11,9 +11,9 @@ using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Online; using osu.Game.Online;
namespace osu.Game.Overlays.Direct namespace osu.Game.Overlays.BeatmapListing.Panels
{ {
public class PanelDownloadButton : BeatmapDownloadTrackingComposite public class BeatmapPanelDownloadButton : BeatmapDownloadTrackingComposite
{ {
protected bool DownloadEnabled => button.Enabled.Value; protected bool DownloadEnabled => button.Enabled.Value;
@ -26,7 +26,7 @@ namespace osu.Game.Overlays.Direct
private readonly DownloadButton button; private readonly DownloadButton button;
private Bindable<bool> noVideoSetting; private Bindable<bool> noVideoSetting;
public PanelDownloadButton(BeatmapSetInfo beatmapSet) public BeatmapPanelDownloadButton(BeatmapSetInfo beatmapSet)
: base(beatmapSet) : base(beatmapSet)
{ {
InternalChild = shakeContainer = new ShakeContainer InternalChild = shakeContainer = new ShakeContainer

View File

@ -1,25 +1,25 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using osuTK;
using osuTK.Graphics;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Framework.Localisation; using osu.Framework.Localisation;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Drawables; using osu.Game.Beatmaps.Drawables;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Overlays.Direct namespace osu.Game.Overlays.BeatmapListing.Panels
{ {
public class DirectGridPanel : DirectPanel public class BeatmapPanelGrid : 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.Direct
protected override PlayButton PlayButton => playButton; protected override PlayButton PlayButton => playButton;
protected override Box PreviewBar => progressBar; protected override Box PreviewBar => progressBar;
public DirectGridPanel(BeatmapSetInfo beatmap) public BeatmapPanelGrid(BeatmapSetInfo beatmap)
: base(beatmap) : base(beatmap)
{ {
Width = 380; Width = 380;
@ -156,7 +156,7 @@ namespace osu.Game.Overlays.Direct
}, },
}, },
}, },
new PanelDownloadButton(SetInfo) new BeatmapPanelDownloadButton(SetInfo)
{ {
Size = new Vector2(50, 30), Size = new Vector2(50, 30),
Margin = new MarginPadding(horizontal_padding), Margin = new MarginPadding(horizontal_padding),

View File

@ -1,25 +1,25 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using osuTK; using osu.Framework.Allocation;
using osuTK.Graphics;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Colour;
using osu.Game.Graphics; using osu.Framework.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osu.Framework.Allocation;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation; using osu.Framework.Localisation;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Drawables; using osu.Game.Beatmaps.Drawables;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Overlays.Direct namespace osu.Game.Overlays.BeatmapListing.Panels
{ {
public class DirectListPanel : DirectPanel public class BeatmapPanelList : 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;
@ -27,7 +27,7 @@ namespace osu.Game.Overlays.Direct
private const float height = 70; private const float height = 70;
private FillFlowContainer statusContainer; private FillFlowContainer statusContainer;
protected PanelDownloadButton DownloadButton; protected BeatmapPanelDownloadButton DownloadButton;
private PlayButton playButton; private PlayButton playButton;
private Box progressBar; private Box progressBar;
@ -36,7 +36,7 @@ namespace osu.Game.Overlays.Direct
protected override PlayButton PlayButton => playButton; protected override PlayButton PlayButton => playButton;
protected override Box PreviewBar => progressBar; protected override Box PreviewBar => progressBar;
public DirectListPanel(BeatmapSetInfo beatmap) public BeatmapPanelList(BeatmapSetInfo beatmap)
: base(beatmap) : base(beatmap)
{ {
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
@ -151,7 +151,7 @@ namespace osu.Game.Overlays.Direct
Anchor = Anchor.CentreRight, Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight, Origin = Anchor.CentreRight,
AutoSizeAxes = Axes.Both, AutoSizeAxes = Axes.Both,
Child = DownloadButton = new PanelDownloadButton(SetInfo) Child = DownloadButton = new BeatmapPanelDownloadButton(SetInfo)
{ {
Size = new Vector2(height - vertical_padding * 3), Size = new Vector2(height - vertical_padding * 3),
Margin = new MarginPadding { Left = vertical_padding * 2, Right = vertical_padding }, Margin = new MarginPadding { Left = vertical_padding * 2, Right = vertical_padding },

View File

@ -10,7 +10,7 @@ using osu.Game.Graphics.UserInterface;
using osu.Game.Online; using osu.Game.Online;
using osuTK.Graphics; using osuTK.Graphics;
namespace osu.Game.Overlays.Direct namespace osu.Game.Overlays.BeatmapListing.Panels
{ {
public class DownloadProgressBar : BeatmapDownloadTrackingComposite public class DownloadProgressBar : BeatmapDownloadTrackingComposite
{ {

View File

@ -8,7 +8,7 @@ using osu.Framework.Graphics.Sprites;
using osuTK; using osuTK;
using osuTK.Graphics; using osuTK.Graphics;
namespace osu.Game.Overlays.Direct namespace osu.Game.Overlays.BeatmapListing.Panels
{ {
public class IconPill : CircularContainer public class IconPill : CircularContainer
{ {

View File

@ -14,7 +14,7 @@ using osu.Game.Graphics.UserInterface;
using osuTK; using osuTK;
using osuTK.Graphics; using osuTK.Graphics;
namespace osu.Game.Overlays.Direct namespace osu.Game.Overlays.BeatmapListing.Panels
{ {
public class PlayButton : Container public class PlayButton : Container
{ {

View File

@ -17,7 +17,7 @@ using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays.BeatmapListing; using osu.Game.Overlays.BeatmapListing;
using osu.Game.Overlays.Direct; using osu.Game.Overlays.BeatmapListing.Panels;
using osuTK; using osuTK;
namespace osu.Game.Overlays namespace osu.Game.Overlays
@ -118,14 +118,14 @@ namespace osu.Game.Overlays
return; return;
} }
var newPanels = new FillFlowContainer<DirectPanel> var newPanels = new FillFlowContainer<BeatmapPanel>
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
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, DirectPanel>(b => new DirectGridPanel(b) ChildrenEnumerable = beatmaps.Select<BeatmapSetInfo, BeatmapPanel>(b => new BeatmapPanelGrid(b)
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,

View File

@ -13,7 +13,7 @@ using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Online; using osu.Game.Online;
using osu.Game.Online.API; using osu.Game.Online.API;
using osu.Game.Overlays.Direct; using osu.Game.Overlays.BeatmapListing.Panels;
using osu.Game.Users; using osu.Game.Users;
using osuTK; using osuTK;
using osuTK.Graphics; using osuTK.Graphics;

View File

@ -11,7 +11,7 @@ using osu.Game.Audio;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Overlays.Direct; using osu.Game.Overlays.BeatmapListing.Panels;
using osuTK; using osuTK;
namespace osu.Game.Overlays.BeatmapSet.Buttons namespace osu.Game.Overlays.BeatmapSet.Buttons

View File

@ -15,8 +15,8 @@ using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Online; using osu.Game.Online;
using osu.Game.Overlays.BeatmapListing.Panels;
using osu.Game.Overlays.BeatmapSet.Buttons; using osu.Game.Overlays.BeatmapSet.Buttons;
using osu.Game.Overlays.Direct;
using osu.Game.Rulesets; using osu.Game.Rulesets;
using osuTK; using osuTK;
using osuTK.Graphics; using osuTK.Graphics;
@ -274,7 +274,7 @@ namespace osu.Game.Overlays.BeatmapSet
{ {
case DownloadState.LocallyAvailable: case DownloadState.LocallyAvailable:
// temporary for UX until new design is implemented. // temporary for UX until new design is implemented.
downloadButtonsContainer.Child = new PanelDownloadButton(BeatmapSet.Value) downloadButtonsContainer.Child = new BeatmapPanelDownloadButton(BeatmapSet.Value)
{ {
Width = 50, Width = 50,
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,

View File

@ -7,7 +7,7 @@ using osu.Framework.Graphics;
using osu.Game.Online.API; using osu.Game.Online.API;
using osu.Game.Online.API.Requests; using osu.Game.Online.API.Requests;
using osu.Game.Online.API.Requests.Responses; using osu.Game.Online.API.Requests.Responses;
using osu.Game.Overlays.Direct; using osu.Game.Overlays.BeatmapListing.Panels;
using osu.Game.Users; using osu.Game.Users;
using osuTK; using osuTK;
@ -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 DirectGridPanel(model.ToBeatmapSet(Rulesets)) : new BeatmapPanelGrid(model.ToBeatmapSet(Rulesets))
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,

View File

@ -12,10 +12,10 @@ using osu.Game.Online.API;
using osu.Game.Online.API.Requests; using osu.Game.Online.API.Requests;
using osu.Game.Overlays.Rankings.Tables; using osu.Game.Overlays.Rankings.Tables;
using System.Linq; using System.Linq;
using osu.Game.Overlays.Direct;
using System.Threading; using System.Threading;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays.BeatmapListing.Panels;
namespace osu.Game.Overlays.Rankings namespace osu.Game.Overlays.Rankings
{ {
@ -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 DirectGridPanel(b.ToBeatmapSet(rulesets)) Children = response.BeatmapSets.Select(b => new BeatmapPanelGrid(b.ToBeatmapSet(rulesets))
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,

View File

@ -21,7 +21,7 @@ using osu.Game.Graphics.UserInterface;
using osu.Game.Online; using osu.Game.Online;
using osu.Game.Online.Chat; using osu.Game.Online.Chat;
using osu.Game.Online.Multiplayer; using osu.Game.Online.Multiplayer;
using osu.Game.Overlays.Direct; using osu.Game.Overlays.BeatmapListing.Panels;
using osu.Game.Rulesets; using osu.Game.Rulesets;
using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Mods;
using osu.Game.Screens.Play.HUD; using osu.Game.Screens.Play.HUD;
@ -210,7 +210,7 @@ namespace osu.Game.Screens.Multi
return true; return true;
} }
private class PlaylistDownloadButton : PanelDownloadButton private class PlaylistDownloadButton : BeatmapPanelDownloadButton
{ {
public PlaylistDownloadButton(BeatmapSetInfo beatmapSet) public PlaylistDownloadButton(BeatmapSetInfo beatmapSet)
: base(beatmapSet) : base(beatmapSet)