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