Merge branch 'master' into better-mp-songselect-deletion-handling

This commit is contained in:
Dan Balasescu
2019-02-28 17:35:08 +09:00
committed by GitHub
317 changed files with 1152 additions and 740 deletions

View File

@ -254,6 +254,7 @@ namespace osu.Game.Screens.Select
{
case CarouselBeatmap beatmap:
if (skipDifficulties) continue;
select(beatmap);
return;
case CarouselBeatmapSet set:
@ -327,6 +328,7 @@ namespace osu.Game.Screens.Select
private void select(CarouselItem item)
{
if (item == null) return;
item.State.Value = CarouselItemState.Selected;
}

View File

@ -20,12 +20,10 @@ namespace osu.Game.Screens.Select
public readonly BeatmapLeaderboard Leaderboard;
private WorkingBeatmap beatmap;
public WorkingBeatmap Beatmap
{
get
{
return beatmap;
}
get => beatmap;
set
{
beatmap = value;

View File

@ -41,12 +41,14 @@ namespace osu.Game.Screens.Select
private ScheduledDelegate pendingBeatmapSwitch;
private BeatmapInfo beatmap;
public BeatmapInfo Beatmap
{
get { return beatmap; }
get => beatmap;
set
{
if (value == beatmap) return;
beatmap = value;
pendingBeatmapSwitch?.Cancel();

View File

@ -96,6 +96,7 @@ namespace osu.Game.Screens.Select.Carousel
foreach (var b in InternalChildren)
{
if (item == b) continue;
b.State.Value = CarouselItemState.NotSelected;
}

View File

@ -38,7 +38,8 @@ namespace osu.Game.Screens.Select.Carousel
private BeatmapSetOverlay beatmapOverlay;
public DrawableCarouselBeatmap(CarouselBeatmap panel) : base(panel)
public DrawableCarouselBeatmap(CarouselBeatmap panel)
: base(panel)
{
beatmap = panel.Beatmap;
Height *= 0.60f;

View File

@ -49,11 +49,11 @@ namespace osu.Game.Screens.Select.Carousel
Children = new Drawable[]
{
new DelayedLoadUnloadWrapper(() =>
new PanelBackground(manager.GetWorkingBeatmap(beatmapSet.Beatmaps.FirstOrDefault()))
{
RelativeSizeAxes = Axes.Both,
OnLoadComplete = d => d.FadeInFromZero(1000, Easing.OutQuint),
}, 300, 5000
new PanelBackground(manager.GetWorkingBeatmap(beatmapSet.Beatmaps.FirstOrDefault()))
{
RelativeSizeAxes = Axes.Both,
OnLoadComplete = d => d.FadeInFromZero(1000, Easing.OutQuint),
}, 300, 5000
),
new FillFlowContainer
{

View File

@ -20,12 +20,14 @@ namespace osu.Game.Screens.Select.Details
private readonly StatisticRow firstValue, hpDrain, accuracy, approachRate, starDifficulty;
private BeatmapInfo beatmap;
public BeatmapInfo Beatmap
{
get { return beatmap; }
get => beatmap;
set
{
if (value == beatmap) return;
beatmap = value;
//mania specific
@ -83,14 +85,15 @@ namespace osu.Game.Screens.Select.Details
public string Title
{
get { return name.Text; }
set { name.Text = value; }
get => name.Text;
set => name.Text = value;
}
private float difficultyValue;
public float Value
{
get { return difficultyValue; }
get => difficultyValue;
set
{
difficultyValue = value;
@ -101,8 +104,8 @@ namespace osu.Game.Screens.Select.Details
public Color4 AccentColour
{
get { return bar.AccentColour; }
set { bar.AccentColour = value; }
get => bar.AccentColour;
set => bar.AccentColour = value;
}
public StatisticRow(float maxValue = 10, bool forceDecimalPlaces = false)

View File

@ -17,12 +17,14 @@ namespace osu.Game.Screens.Select.Details
private readonly BarGraph retryGraph, failGraph;
private BeatmapMetrics metrics;
public BeatmapMetrics Metrics
{
get { return metrics; }
get => metrics;
set
{
if (value == metrics) return;
metrics = value;
var retries = Metrics?.Retries ?? new int[0];

View File

@ -24,10 +24,11 @@ namespace osu.Game.Screens.Select.Details
public BeatmapMetrics Metrics
{
get { return metrics; }
get => metrics;
set
{
if (value == metrics) return;
metrics = value;
const int rating_range = 10;

View File

@ -9,32 +9,46 @@ namespace osu.Game.Screens.Select.Filter
{
[Description("All")]
All,
[Description("Artist")]
Artist,
[Description("Author")]
Author,
[Description("BPM")]
BPM,
[Description("Collections")]
Collections,
[Description("Date Added")]
DateAdded,
[Description("Difficulty")]
Difficulty,
[Description("Favourites")]
Favourites,
[Description("Length")]
Length,
[Description("My Maps")]
MyMaps,
[Description("No Grouping")]
NoGrouping,
[Description("Rank Achieved")]
RankAchieved,
[Description("Ranked Status")]
RankedStatus,
[Description("Recently Played")]
RecentlyPlayed,
[Description("Title")]
Title
}

View File

@ -9,18 +9,25 @@ namespace osu.Game.Screens.Select.Filter
{
[Description("Artist")]
Artist,
[Description("Author")]
Author,
[Description("BPM")]
BPM,
[Description("Date Added")]
DateAdded,
[Description("Difficulty")]
Difficulty,
[Description("Length")]
Length,
[Description("Rank Achieved")]
RankAchieved,
[Description("Title")]
Title
}

View File

@ -32,7 +32,7 @@ namespace osu.Game.Screens.Select
public SortMode Sort
{
get { return sort; }
get => sort;
set
{
if (sort != value)
@ -47,7 +47,7 @@ namespace osu.Game.Screens.Select
public GroupMode Group
{
get { return group; }
get => group;
set
{
if (group != value)

View File

@ -22,7 +22,7 @@ namespace osu.Game.Screens.Select
public string SearchText
{
get { return searchText; }
get => searchText;
set
{
searchText = value;

View File

@ -20,7 +20,7 @@ namespace osu.Game.Screens.Select
public string Text
{
get { return spriteText?.Text; }
get => spriteText?.Text;
set
{
if (spriteText != null)
@ -29,9 +29,10 @@ namespace osu.Game.Screens.Select
}
private Color4 deselectedColour;
public Color4 DeselectedColour
{
get { return deselectedColour; }
get => deselectedColour;
set
{
deselectedColour = value;
@ -41,9 +42,10 @@ namespace osu.Game.Screens.Select
}
private Color4 selectedColour;
public Color4 SelectedColour
{
get { return selectedColour; }
get => selectedColour;
set
{
selectedColour = value;

View File

@ -23,7 +23,7 @@ namespace osu.Game.Screens.Select.Leaderboards
public BeatmapInfo Beatmap
{
get { return beatmap; }
get => beatmap;
set
{
if (beatmap == value)

View File

@ -28,26 +28,26 @@ namespace osu.Game.Screens.Select.Options
public Color4 ButtonColour
{
get { return background.Colour; }
set { background.Colour = value; }
get => background.Colour;
set => background.Colour = value;
}
public FontAwesome Icon
{
get { return iconText.Icon; }
set { iconText.Icon = value; }
get => iconText.Icon;
set => iconText.Icon = value;
}
public string FirstLineText
{
get { return firstLine.Text; }
set { firstLine.Text = value; }
get => firstLine.Text;
set => firstLine.Text = value;
}
public string SecondLineText
{
get { return secondLine.Text; }
set { secondLine.Text = value; }
get => secondLine.Text;
set => secondLine.Text = value;
}
public Key? HotKey;

View File

@ -65,7 +65,7 @@ namespace osu.Game.Screens.Select
LoadComponentAsync(player = new PlayerLoader(() => new Player()), l =>
{
if (this.IsCurrentScreen())this.Push(player);
if (this.IsCurrentScreen()) this.Push(player);
});
return true;

View File

@ -209,7 +209,7 @@ namespace osu.Game.Screens.Select
});
}
BeatmapDetails.Leaderboard.ScoreSelected += s =>this.Push(new SoloResults(s));
BeatmapDetails.Leaderboard.ScoreSelected += s => this.Push(new SoloResults(s));
}
[BackgroundDependencyLoader(true)]
@ -285,8 +285,8 @@ namespace osu.Game.Screens.Select
public void Edit(BeatmapInfo beatmap = null)
{
Beatmap.Value = beatmaps.GetWorkingBeatmap(beatmap ?? beatmapNoDebounce);
this.Push(new Editor());
Beatmap.Value = beatmaps.GetWorkingBeatmap(beatmap ?? beatmapNoDebounce);
this.Push(new Editor());
}
/// <summary>
@ -512,12 +512,6 @@ namespace osu.Game.Screens.Select
if (base.OnExiting(next))
return true;
if (ModSelect.State == Visibility.Visible)
{
ModSelect.Hide();
return true;
}
beatmapInfoWedge.State = Visibility.Hidden;
this.FadeOut(100);
@ -623,6 +617,7 @@ namespace osu.Game.Screens.Select
private void delete(BeatmapSetInfo beatmap)
{
if (beatmap == null || beatmap.ID <= 0) return;
dialogOverlay?.Push(new BeatmapDeleteDialog(beatmap));
}