1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:52:53 +08:00

Rename download buttons to avoid ambiguity

This commit is contained in:
Dean Herbert 2019-07-03 12:02:35 +09:00
parent 466bc7f28a
commit 23acddcb56
9 changed files with 21 additions and 22 deletions

View File

@ -32,7 +32,7 @@ namespace osu.Game.Tests.Visual.Online
typeof(BasicStats),
typeof(BeatmapPicker),
typeof(Details),
typeof(DownloadButton),
typeof(HeaderDownloadButton),
typeof(FavouriteButton),
typeof(Header),
typeof(HeaderButton),

View File

@ -20,7 +20,7 @@ namespace osu.Game.Tests.Visual.Online
{
public override IReadOnlyList<Type> RequiredTypes => new[]
{
typeof(DownloadButton)
typeof(PanelDownloadButton)
};
private TestDownloadButton downloadButton;
@ -143,7 +143,7 @@ namespace osu.Game.Tests.Visual.Online
return beatmap;
}
private class TestDownloadButton : DownloadButton
private class TestDownloadButton : PanelDownloadButton
{
public new bool DownloadEnabled => base.DownloadEnabled;

View File

@ -11,7 +11,7 @@ using osuTK;
namespace osu.Game.Graphics.UserInterface
{
public class OsuDownloadButton : OsuAnimatedButton
public class DownloadButton : OsuAnimatedButton
{
public readonly Bindable<DownloadState> State = new Bindable<DownloadState>();
@ -21,7 +21,7 @@ namespace osu.Game.Graphics.UserInterface
private OsuColour colours;
public OsuDownloadButton()
public DownloadButton()
{
Children = new Drawable[]
{

View File

@ -20,7 +20,7 @@ using osuTK.Graphics;
namespace osu.Game.Overlays.BeatmapSet.Buttons
{
public class DownloadButton : BeatmapDownloadTrackingComposite, IHasTooltip
public class HeaderDownloadButton : BeatmapDownloadTrackingComposite, IHasTooltip
{
private readonly bool noVideo;
@ -31,7 +31,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
private ShakeContainer shakeContainer;
private HeaderButton button;
public DownloadButton(BeatmapSetInfo beatmapSet, bool noVideo = false)
public HeaderDownloadButton(BeatmapSetInfo beatmapSet, bool noVideo = false)
: base(beatmapSet)
{
this.noVideo = noVideo;

View File

@ -18,7 +18,6 @@ using osu.Game.Overlays.BeatmapSet.Buttons;
using osu.Game.Overlays.Direct;
using osuTK;
using osuTK.Graphics;
using DownloadButton = osu.Game.Overlays.BeatmapSet.Buttons.DownloadButton;
namespace osu.Game.Overlays.BeatmapSet
{
@ -268,7 +267,7 @@ namespace osu.Game.Overlays.BeatmapSet
{
case DownloadState.LocallyAvailable:
// temporary for UX until new design is implemented.
downloadButtonsContainer.Child = new Direct.DownloadButton(BeatmapSet.Value)
downloadButtonsContainer.Child = new PanelDownloadButton(BeatmapSet.Value)
{
Width = 50,
RelativeSizeAxes = Axes.Y
@ -278,13 +277,13 @@ namespace osu.Game.Overlays.BeatmapSet
case DownloadState.Downloading:
case DownloadState.Downloaded:
// temporary to avoid showing two buttons for maps with novideo. will be fixed in new beatmap overlay design.
downloadButtonsContainer.Child = new DownloadButton(BeatmapSet.Value);
downloadButtonsContainer.Child = new HeaderDownloadButton(BeatmapSet.Value);
break;
default:
downloadButtonsContainer.Child = new DownloadButton(BeatmapSet.Value);
downloadButtonsContainer.Child = new HeaderDownloadButton(BeatmapSet.Value);
if (BeatmapSet.Value.OnlineInfo.HasVideo)
downloadButtonsContainer.Add(new DownloadButton(BeatmapSet.Value, true));
downloadButtonsContainer.Add(new HeaderDownloadButton(BeatmapSet.Value, true));
break;
}
}

View File

@ -155,7 +155,7 @@ namespace osu.Game.Overlays.Direct
},
},
},
new DownloadButton(SetInfo)
new PanelDownloadButton(SetInfo)
{
Size = new Vector2(50, 30),
Margin = new MarginPadding(horizontal_padding),

View File

@ -27,7 +27,7 @@ namespace osu.Game.Overlays.Direct
private const float height = 70;
private FillFlowContainer statusContainer;
protected DownloadButton DownloadButton;
protected PanelDownloadButton DownloadButton;
private PlayButton playButton;
private Box progressBar;
@ -150,7 +150,7 @@ namespace osu.Game.Overlays.Direct
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
AutoSizeAxes = Axes.Both,
Child = DownloadButton = new DownloadButton(SetInfo)
Child = DownloadButton = new PanelDownloadButton(SetInfo)
{
Size = new Vector2(height - vertical_padding * 3),
Margin = new MarginPadding { Left = vertical_padding * 2, Right = vertical_padding },

View File

@ -1,4 +1,4 @@
// 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.
using osu.Framework.Allocation;
@ -10,16 +10,16 @@ using osu.Game.Online;
namespace osu.Game.Overlays.Direct
{
public class DownloadButton : BeatmapDownloadTrackingComposite
public class PanelDownloadButton : BeatmapDownloadTrackingComposite
{
protected bool DownloadEnabled => button.Enabled.Value;
private readonly bool noVideo;
private readonly ShakeContainer shakeContainer;
private readonly OsuDownloadButton button;
private readonly DownloadButton button;
public DownloadButton(BeatmapSetInfo beatmapSet, bool noVideo = false)
public PanelDownloadButton(BeatmapSetInfo beatmapSet, bool noVideo = false)
: base(beatmapSet)
{
this.noVideo = noVideo;
@ -27,7 +27,7 @@ namespace osu.Game.Overlays.Direct
InternalChild = shakeContainer = new ShakeContainer
{
RelativeSizeAxes = Axes.Both,
Child = button = new OsuDownloadButton
Child = button = new DownloadButton
{
RelativeSizeAxes = Axes.Both,
},

View File

@ -13,7 +13,7 @@ namespace osu.Game.Screens.Play
{
public class ReplayDownloadButton : DownloadTrackingComposite<ScoreInfo, ScoreManager>
{
private OsuDownloadButton button;
private DownloadButton button;
private ShakeContainer shakeContainer;
private ReplayAvailability replayAvailability
@ -41,7 +41,7 @@ namespace osu.Game.Screens.Play
InternalChild = shakeContainer = new ShakeContainer
{
RelativeSizeAxes = Axes.Both,
Child = button = new OsuDownloadButton
Child = button = new DownloadButton
{
RelativeSizeAxes = Axes.Both,
}