mirror of
https://github.com/ppy/osu
synced 2025-02-16 01:56:58 +00:00
Move and rename remaining direct classes
This commit is contained in:
parent
1cec0575b7
commit
9b9b710ded
@ -9,7 +9,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Online;
|
||||
using osu.Game.Overlays.Direct;
|
||||
using osu.Game.Overlays.BeatmapListing.Panels;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Tests.Resources;
|
||||
using osuTK;
|
||||
@ -20,7 +20,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
{
|
||||
typeof(PanelDownloadButton)
|
||||
typeof(BeatmapPanelDownloadButton)
|
||||
};
|
||||
|
||||
private TestDownloadButton downloadButton;
|
||||
@ -143,7 +143,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
return beatmap;
|
||||
}
|
||||
|
||||
private class TestDownloadButton : PanelDownloadButton
|
||||
private class TestDownloadButton : BeatmapPanelDownloadButton
|
||||
{
|
||||
public new bool DownloadEnabled => base.DownloadEnabled;
|
||||
|
||||
|
@ -8,7 +8,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Audio;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Overlays.Direct;
|
||||
using osu.Game.Overlays.BeatmapListing.Panels;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Users;
|
||||
using osuTK;
|
||||
@ -20,8 +20,8 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
{
|
||||
typeof(DirectGridPanel),
|
||||
typeof(DirectListPanel),
|
||||
typeof(BeatmapPanelGrid),
|
||||
typeof(BeatmapPanelList),
|
||||
typeof(IconPill)
|
||||
};
|
||||
|
||||
@ -126,12 +126,12 @@ namespace osu.Game.Tests.Visual.Online
|
||||
Spacing = new Vector2(5, 20),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new DirectGridPanel(normal),
|
||||
new DirectGridPanel(undownloadable),
|
||||
new DirectGridPanel(manyDifficulties),
|
||||
new DirectListPanel(normal),
|
||||
new DirectListPanel(undownloadable),
|
||||
new DirectListPanel(manyDifficulties),
|
||||
new BeatmapPanelGrid(normal),
|
||||
new BeatmapPanelGrid(undownloadable),
|
||||
new BeatmapPanelGrid(manyDifficulties),
|
||||
new BeatmapPanelList(normal),
|
||||
new BeatmapPanelList(undownloadable),
|
||||
new BeatmapPanelList(manyDifficulties),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -47,15 +47,8 @@ namespace osu.Game.Tests.Visual
|
||||
typeof(IdleTracker),
|
||||
typeof(OnScreenDisplay),
|
||||
typeof(NotificationOverlay),
|
||||
<<<<<<< HEAD
|
||||
typeof(DirectOverlay),
|
||||
typeof(BeatmapListingOverlay),
|
||||
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(ChatOverlay),
|
||||
typeof(SettingsOverlay),
|
||||
|
@ -5,7 +5,7 @@ using osu.Framework.Bindables;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Online;
|
||||
|
||||
namespace osu.Game.Overlays.Direct
|
||||
namespace osu.Game.Overlays
|
||||
{
|
||||
public abstract class BeatmapDownloadTrackingComposite : DownloadTrackingComposite<BeatmapSetInfo, BeatmapManager>
|
||||
{
|
@ -26,9 +26,9 @@ using osu.Game.Graphics.UserInterface;
|
||||
using osuTK;
|
||||
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;
|
||||
|
||||
@ -49,7 +49,7 @@ namespace osu.Game.Overlays.Direct
|
||||
|
||||
protected Action ViewBeatmap;
|
||||
|
||||
protected DirectPanel(BeatmapSetInfo setInfo)
|
||||
protected BeatmapPanel(BeatmapSetInfo setInfo)
|
||||
{
|
||||
Debug.Assert(setInfo.OnlineBeatmapSetID != null);
|
||||
|
||||
@ -148,7 +148,7 @@ namespace osu.Game.Overlays.Direct
|
||||
if (SetInfo.Beatmaps.Count > maximum_difficulty_icons)
|
||||
{
|
||||
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
|
||||
{
|
@ -11,9 +11,9 @@ using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
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;
|
||||
|
||||
@ -26,7 +26,7 @@ namespace osu.Game.Overlays.Direct
|
||||
private readonly DownloadButton button;
|
||||
private Bindable<bool> noVideoSetting;
|
||||
|
||||
public PanelDownloadButton(BeatmapSetInfo beatmapSet)
|
||||
public BeatmapPanelDownloadButton(BeatmapSetInfo beatmapSet)
|
||||
: base(beatmapSet)
|
||||
{
|
||||
InternalChild = shakeContainer = new ShakeContainer
|
@ -1,25 +1,25 @@
|
||||
// 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.
|
||||
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.Drawables;
|
||||
using osu.Game.Graphics;
|
||||
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 vertical_padding = 5;
|
||||
@ -31,7 +31,7 @@ namespace osu.Game.Overlays.Direct
|
||||
protected override PlayButton PlayButton => playButton;
|
||||
protected override Box PreviewBar => progressBar;
|
||||
|
||||
public DirectGridPanel(BeatmapSetInfo beatmap)
|
||||
public BeatmapPanelGrid(BeatmapSetInfo beatmap)
|
||||
: base(beatmap)
|
||||
{
|
||||
Width = 380;
|
||||
@ -156,7 +156,7 @@ namespace osu.Game.Overlays.Direct
|
||||
},
|
||||
},
|
||||
},
|
||||
new PanelDownloadButton(SetInfo)
|
||||
new BeatmapPanelDownloadButton(SetInfo)
|
||||
{
|
||||
Size = new Vector2(50, 30),
|
||||
Margin = new MarginPadding(horizontal_padding),
|
@ -1,25 +1,25 @@
|
||||
// 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.
|
||||
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Colour;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.Drawables;
|
||||
using osu.Game.Graphics;
|
||||
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 horizontal_padding = 10;
|
||||
@ -27,7 +27,7 @@ namespace osu.Game.Overlays.Direct
|
||||
private const float height = 70;
|
||||
|
||||
private FillFlowContainer statusContainer;
|
||||
protected PanelDownloadButton DownloadButton;
|
||||
protected BeatmapPanelDownloadButton DownloadButton;
|
||||
private PlayButton playButton;
|
||||
private Box progressBar;
|
||||
|
||||
@ -36,7 +36,7 @@ namespace osu.Game.Overlays.Direct
|
||||
protected override PlayButton PlayButton => playButton;
|
||||
protected override Box PreviewBar => progressBar;
|
||||
|
||||
public DirectListPanel(BeatmapSetInfo beatmap)
|
||||
public BeatmapPanelList(BeatmapSetInfo beatmap)
|
||||
: base(beatmap)
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
@ -151,7 +151,7 @@ namespace osu.Game.Overlays.Direct
|
||||
Anchor = Anchor.CentreRight,
|
||||
Origin = Anchor.CentreRight,
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Child = DownloadButton = new PanelDownloadButton(SetInfo)
|
||||
Child = DownloadButton = new BeatmapPanelDownloadButton(SetInfo)
|
||||
{
|
||||
Size = new Vector2(height - vertical_padding * 3),
|
||||
Margin = new MarginPadding { Left = vertical_padding * 2, Right = vertical_padding },
|
@ -10,7 +10,7 @@ using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Online;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.Direct
|
||||
namespace osu.Game.Overlays.BeatmapListing.Panels
|
||||
{
|
||||
public class DownloadProgressBar : BeatmapDownloadTrackingComposite
|
||||
{
|
@ -8,7 +8,7 @@ using osu.Framework.Graphics.Sprites;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.Direct
|
||||
namespace osu.Game.Overlays.BeatmapListing.Panels
|
||||
{
|
||||
public class IconPill : CircularContainer
|
||||
{
|
@ -14,7 +14,7 @@ using osu.Game.Graphics.UserInterface;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.Direct
|
||||
namespace osu.Game.Overlays.BeatmapListing.Panels
|
||||
{
|
||||
public class PlayButton : Container
|
||||
{
|
@ -17,7 +17,7 @@ using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Overlays.BeatmapListing;
|
||||
using osu.Game.Overlays.Direct;
|
||||
using osu.Game.Overlays.BeatmapListing.Panels;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Overlays
|
||||
@ -118,14 +118,14 @@ namespace osu.Game.Overlays
|
||||
return;
|
||||
}
|
||||
|
||||
var newPanels = new FillFlowContainer<DirectPanel>
|
||||
var newPanels = new FillFlowContainer<BeatmapPanel>
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Spacing = new Vector2(10),
|
||||
Alpha = 0,
|
||||
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,
|
||||
Origin = Anchor.TopCentre,
|
||||
|
@ -13,7 +13,7 @@ using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Online;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Overlays.Direct;
|
||||
using osu.Game.Overlays.BeatmapListing.Panels;
|
||||
using osu.Game.Users;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
@ -11,7 +11,7 @@ using osu.Game.Audio;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Overlays.Direct;
|
||||
using osu.Game.Overlays.BeatmapListing.Panels;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Overlays.BeatmapSet.Buttons
|
||||
|
@ -15,8 +15,8 @@ using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Online;
|
||||
using osu.Game.Overlays.BeatmapListing.Panels;
|
||||
using osu.Game.Overlays.BeatmapSet.Buttons;
|
||||
using osu.Game.Overlays.Direct;
|
||||
using osu.Game.Rulesets;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
@ -274,7 +274,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
case DownloadState.LocallyAvailable:
|
||||
// temporary for UX until new design is implemented.
|
||||
downloadButtonsContainer.Child = new PanelDownloadButton(BeatmapSet.Value)
|
||||
downloadButtonsContainer.Child = new BeatmapPanelDownloadButton(BeatmapSet.Value)
|
||||
{
|
||||
Width = 50,
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
|
@ -7,7 +7,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Online.API.Requests;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Overlays.Direct;
|
||||
using osu.Game.Overlays.BeatmapListing.Panels;
|
||||
using osu.Game.Users;
|
||||
using osuTK;
|
||||
|
||||
@ -33,7 +33,7 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps
|
||||
|
||||
protected override Drawable CreateDrawableItem(APIBeatmapSet model) => !model.OnlineBeatmapSetID.HasValue
|
||||
? null
|
||||
: new DirectGridPanel(model.ToBeatmapSet(Rulesets))
|
||||
: new BeatmapPanelGrid(model.ToBeatmapSet(Rulesets))
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
|
@ -12,10 +12,10 @@ using osu.Game.Online.API;
|
||||
using osu.Game.Online.API.Requests;
|
||||
using osu.Game.Overlays.Rankings.Tables;
|
||||
using System.Linq;
|
||||
using osu.Game.Overlays.Direct;
|
||||
using System.Threading;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Overlays.BeatmapListing.Panels;
|
||||
|
||||
namespace osu.Game.Overlays.Rankings
|
||||
{
|
||||
@ -140,7 +140,7 @@ namespace osu.Game.Overlays.Rankings
|
||||
AutoSizeAxes = Axes.Y,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
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,
|
||||
Origin = Anchor.TopCentre,
|
||||
|
@ -21,7 +21,7 @@ using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Online;
|
||||
using osu.Game.Online.Chat;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Overlays.Direct;
|
||||
using osu.Game.Overlays.BeatmapListing.Panels;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Screens.Play.HUD;
|
||||
@ -210,7 +210,7 @@ namespace osu.Game.Screens.Multi
|
||||
return true;
|
||||
}
|
||||
|
||||
private class PlaylistDownloadButton : PanelDownloadButton
|
||||
private class PlaylistDownloadButton : BeatmapPanelDownloadButton
|
||||
{
|
||||
public PlaylistDownloadButton(BeatmapSetInfo beatmapSet)
|
||||
: base(beatmapSet)
|
||||
|
Loading…
Reference in New Issue
Block a user