mirror of
https://github.com/ppy/osu
synced 2025-01-22 05:43:14 +00:00
Formatting fixes.
This commit is contained in:
parent
ef8a35f5cc
commit
9ea83230aa
@ -192,8 +192,10 @@ namespace osu.Game.Screens.Select
|
||||
ScrollTo(selectedY, animated);
|
||||
}
|
||||
|
||||
public void Sort(FilterControl.SortMode mode) {
|
||||
switch (mode) {
|
||||
public void Sort(FilterControl.SortMode mode)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case FilterControl.SortMode.Artist:
|
||||
groups.Sort((x, y) => string.Compare(x.BeatmapSet.Metadata.Artist, y.BeatmapSet.Metadata.Artist));
|
||||
break;
|
||||
@ -206,15 +208,17 @@ namespace osu.Game.Screens.Select
|
||||
case FilterControl.SortMode.Difficulty:
|
||||
groups.Sort((x, y) =>
|
||||
{
|
||||
float xAverage=0, yAverage=0;
|
||||
int counter=0;
|
||||
foreach (BeatmapInfo set in x.BeatmapSet.Beatmaps) {
|
||||
float xAverage = 0, yAverage = 0;
|
||||
int counter = 0;
|
||||
foreach (BeatmapInfo set in x.BeatmapSet.Beatmaps)
|
||||
{
|
||||
xAverage += set.StarDifficulty;
|
||||
counter++;
|
||||
}
|
||||
xAverage /= counter;
|
||||
counter = 0;
|
||||
foreach (BeatmapInfo set in y.BeatmapSet.Beatmaps) {
|
||||
foreach (BeatmapInfo set in y.BeatmapSet.Beatmaps)
|
||||
{
|
||||
yAverage += set.StarDifficulty;
|
||||
counter++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user