-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #368 from tacchinotacchi/master
Added basic sorting functionality
- Loading branch information
Showing
16 changed files
with
112 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
// Copyright (c) 2007-2017 ppy Pty Ltd <[email protected]>. | ||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using osu.Desktop.VisualTests.Platform; | ||
using osu.Framework.Screens.Testing; | ||
using osu.Framework.MathUtils; | ||
using osu.Game.Database; | ||
using osu.Game.Modes; | ||
using osu.Game.Screens.Select; | ||
|
@@ -14,6 +16,7 @@ class TestCasePlaySongSelect : TestCase | |
{ | ||
private BeatmapDatabase db, oldDb; | ||
private TestStorage storage; | ||
private PlaySongSelect songSelect; | ||
|
||
public override string Name => @"Song Select"; | ||
public override string Description => @"with fake data"; | ||
|
@@ -35,9 +38,15 @@ public override void Reset() | |
|
||
db.Import(sets); | ||
} | ||
Add(new PlaySongSelect()); | ||
|
||
Add(songSelect = new PlaySongSelect()); | ||
|
||
AddButton(@"Sort by Artist", delegate { songSelect.Filter.Sort = FilterControl.SortMode.Artist; }); | ||
AddButton(@"Sort by Title", delegate { songSelect.Filter.Sort = FilterControl.SortMode.Title; }); | ||
AddButton(@"Sort by Author", delegate { songSelect.Filter.Sort = FilterControl.SortMode.Author; }); | ||
AddButton(@"Sort by Difficulty", delegate { songSelect.Filter.Sort = FilterControl.SortMode.Difficulty; }); | ||
} | ||
|
||
protected override void Dispose(bool isDisposing) | ||
{ | ||
if (oldDb != null) | ||
|
@@ -59,9 +68,10 @@ private BeatmapSetInfo createTestBeatmapSet(int i) | |
Metadata = new BeatmapMetadata | ||
{ | ||
OnlineBeatmapSetID = 1234 + i, | ||
Artist = "MONACA", | ||
Title = "Black Song", | ||
Author = "Some Guy", | ||
// Create random metadata, then we can check if sorting works based on these | ||
Artist = "MONACA " + RNG.Next(0, 9), | ||
Title = "Black Song " + RNG.Next(0, 9), | ||
Author = "Some Guy " + RNG.Next(0, 9), | ||
}, | ||
Beatmaps = new List<BeatmapInfo>(new[] | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
// Copyright (c) 2007-2017 ppy Pty Ltd <[email protected]>. | ||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE | ||
|
||
|
||
namespace osu.Game.Modes.Osu.Objects | ||
{ | ||
public class HitCircle : OsuHitObject | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
namespace osu.Game.Modes.Osu.Objects | ||
// Copyright (c) 2007-2017 ppy Pty Ltd <[email protected]>. | ||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE | ||
|
||
namespace osu.Game.Modes.Osu.Objects | ||
{ | ||
public class SliderTick : OsuHitObject | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
// Copyright (c) 2007-2017 ppy Pty Ltd <[email protected]>. | ||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE | ||
|
||
|
||
namespace osu.Game.Modes.Osu.Objects | ||
{ | ||
public class Spinner : OsuHitObject | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
// Copyright (c) 2007-2017 ppy Pty Ltd <[email protected]>. | ||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE | ||
|
||
|
||
namespace osu.Game.Modes.Osu | ||
{ | ||
class OsuScore : Score | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
using OpenTK.Graphics; | ||
// Copyright (c) 2007-2017 ppy Pty Ltd <[email protected]>. | ||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE | ||
|
||
using OpenTK.Graphics; | ||
using OpenTK.Input; | ||
using osu.Framework.Input; | ||
using System; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
// Copyright (c) 2007-2017 ppy Pty Ltd <[email protected]>. | ||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE | ||
|
||
|
||
namespace osu.Game.Modes.Objects | ||
{ | ||
public abstract class HitObjectParser | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
// Copyright (c) 2007-2017 ppy Pty Ltd <[email protected]>. | ||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE | ||
|
||
|
||
namespace osu.Game.Modes.Objects | ||
{ | ||
/// <summary> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
// Copyright (c) 2007-2017 ppy Pty Ltd <[email protected]>. | ||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE | ||
|
||
|
||
namespace osu.Game.Modes | ||
{ | ||
public class Score | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// Copyright (c) 2007-2017 ppy Pty Ltd <[email protected]>. | ||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE | ||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE | ||
|
||
using System; | ||
using osu.Framework.Allocation; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
// Copyright (c) 2007-2017 ppy Pty Ltd <[email protected]>. | ||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE | ||
|
||
|
||
namespace osu.Game.Online.API | ||
{ | ||
public interface IOnlineComponent | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
// Copyright (c) 2007-2017 ppy Pty Ltd <[email protected]>. | ||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE | ||
|
||
|
||
namespace osu.Game.Users | ||
{ | ||
public class User | ||
|