mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Merge branch 'master' into fix-disabled-set-crash
This commit is contained in:
@ -29,7 +29,8 @@ namespace osu.Game.Overlays.Direct
|
||||
protected override PlayButton PlayButton => playButton;
|
||||
protected override Box PreviewBar => progressBar;
|
||||
|
||||
public DirectGridPanel(BeatmapSetInfo beatmap) : base(beatmap)
|
||||
public DirectGridPanel(BeatmapSetInfo beatmap)
|
||||
: base(beatmap)
|
||||
{
|
||||
Width = 380;
|
||||
Height = 140 + vertical_padding; //full height of all the elements plus vertical padding (autosize uses the image)
|
||||
|
@ -158,7 +158,7 @@ namespace osu.Game.Overlays.Direct
|
||||
|
||||
public int Value
|
||||
{
|
||||
get { return value; }
|
||||
get => value;
|
||||
set
|
||||
{
|
||||
this.value = value;
|
||||
|
@ -2,7 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Internal;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -41,7 +41,7 @@ namespace osu.Game.Overlays.Direct
|
||||
{
|
||||
if (setInfo.NewValue == null)
|
||||
attachDownload(null);
|
||||
else if (beatmaps.QueryBeatmapSets(s => s.OnlineBeatmapSetID == setInfo.NewValue.OnlineBeatmapSetID).Any())
|
||||
else if (beatmaps.GetAllUsableBeatmapSetsEnumerable().Any(s => s.OnlineBeatmapSetID == setInfo.NewValue.OnlineBeatmapSetID))
|
||||
State.Value = DownloadState.LocallyAvailable;
|
||||
else
|
||||
attachDownload(beatmaps.GetExistingDownload(setInfo.NewValue));
|
||||
@ -63,8 +63,11 @@ namespace osu.Game.Overlays.Direct
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
|
||||
beatmaps.BeatmapDownloadBegan -= attachDownload;
|
||||
beatmaps.ItemAdded -= setAdded;
|
||||
if (beatmaps != null)
|
||||
{
|
||||
beatmaps.BeatmapDownloadBegan -= attachDownload;
|
||||
beatmaps.ItemAdded -= setAdded;
|
||||
}
|
||||
|
||||
State.UnbindAll();
|
||||
|
||||
|
@ -28,10 +28,13 @@ namespace osu.Game.Overlays.Direct
|
||||
public enum DirectTab
|
||||
{
|
||||
Search,
|
||||
|
||||
[Description("Newest Maps")]
|
||||
NewestMaps = DirectSortCriteria.Ranked,
|
||||
|
||||
[Description("Top Rated")]
|
||||
TopRated = DirectSortCriteria.Rating,
|
||||
|
||||
[Description("Most Played")]
|
||||
MostPlayed = DirectSortCriteria.Plays,
|
||||
}
|
||||
|
@ -24,10 +24,11 @@ namespace osu.Game.Overlays.Direct
|
||||
|
||||
public BeatmapSetInfo BeatmapSet
|
||||
{
|
||||
get { return beatmapSet; }
|
||||
get => beatmapSet;
|
||||
set
|
||||
{
|
||||
if (value == beatmapSet) return;
|
||||
|
||||
beatmapSet = value;
|
||||
|
||||
Preview?.Stop();
|
||||
|
Reference in New Issue
Block a user