mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 14:32:55 +08:00
Apply review suggestions
This commit is contained in:
parent
fc1d497a86
commit
633b969017
@ -149,8 +149,8 @@ namespace osu.Game.Tests.Visual.Online
|
||||
|
||||
public DownloadState DownloadState => State.Value;
|
||||
|
||||
public TestDownloadButton(BeatmapSetInfo beatmapSet, bool noVideo = false)
|
||||
: base(beatmapSet, noVideo)
|
||||
public TestDownloadButton(BeatmapSetInfo beatmapSet)
|
||||
: base(beatmapSet)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Configuration;
|
||||
@ -15,16 +16,13 @@ namespace osu.Game.Overlays.Direct
|
||||
{
|
||||
protected bool DownloadEnabled => button.Enabled.Value;
|
||||
|
||||
private readonly bool? noVideo;
|
||||
|
||||
private readonly ShakeContainer shakeContainer;
|
||||
private readonly DownloadButton button;
|
||||
private readonly BindableBool noVideoSetting = new BindableBool();
|
||||
|
||||
public PanelDownloadButton(BeatmapSetInfo beatmapSet, bool? noVideo = null)
|
||||
public PanelDownloadButton(BeatmapSetInfo beatmapSet)
|
||||
: base(beatmapSet)
|
||||
{
|
||||
this.noVideo = noVideo;
|
||||
|
||||
InternalChild = shakeContainer = new ShakeContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
@ -53,6 +51,8 @@ namespace osu.Game.Overlays.Direct
|
||||
return;
|
||||
}
|
||||
|
||||
noVideoSetting.BindTo(osuConfig.GetBindable<bool>(OsuSetting.PreferNoVideo));
|
||||
|
||||
button.Action = () =>
|
||||
{
|
||||
switch (State.Value)
|
||||
@ -67,8 +67,7 @@ namespace osu.Game.Overlays.Direct
|
||||
break;
|
||||
|
||||
default:
|
||||
var minimiseDownloadSize = noVideo ?? osuConfig.GetBindable<bool>(OsuSetting.PreferNoVideo).Value;
|
||||
beatmaps.Download(BeatmapSet.Value, minimiseDownloadSize);
|
||||
beatmaps.Download(BeatmapSet.Value, noVideoSetting.Value);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
@ -23,7 +23,8 @@ namespace osu.Game.Overlays.Settings.Sections.Online
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Prefer no-video downloads",
|
||||
LabelText = "Prefer downloads without video",
|
||||
Keywords = new[] { "no-video" },
|
||||
Bindable = config.GetBindable<bool>(OsuSetting.PreferNoVideo)
|
||||
},
|
||||
};
|
||||
|
@ -212,8 +212,8 @@ namespace osu.Game.Screens.Multi
|
||||
|
||||
private class PlaylistDownloadButton : PanelDownloadButton
|
||||
{
|
||||
public PlaylistDownloadButton(BeatmapSetInfo beatmapSet, bool? noVideo = null)
|
||||
: base(beatmapSet, noVideo)
|
||||
public PlaylistDownloadButton(BeatmapSetInfo beatmapSet)
|
||||
: base(beatmapSet)
|
||||
{
|
||||
Alpha = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user