1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 20:22:55 +08:00

More sorting rookie mistakes

This commit is contained in:
Alex Amadori 2017-02-18 16:23:13 +01:00
parent f48c83b787
commit 21cf96ec10
2 changed files with 12 additions and 4 deletions

View File

@ -16,7 +16,7 @@ namespace osu.Desktop.VisualTests.Tests
private BeatmapDatabase db, oldDb;
private TestStorage storage;
private Random rnd = new Random();
private PlaySongSelect SongSelect = new PlaySongSelect();
private PlaySongSelect SongSelect;
public override string Name => @"Song Select";
public override string Description => @"with fake data";
@ -43,6 +43,8 @@ namespace osu.Desktop.VisualTests.Tests
db.Import(sets);
}
Add(SongSelect = new PlaySongSelect());
OnArtist = () => { SongSelect.Filter.Sort = FilterControl.SortMode.Artist; };
OnTitle = () => { SongSelect.Filter.Sort = FilterControl.SortMode.Title; };
OnAuthor = () => { SongSelect.Filter.Sort = FilterControl.SortMode.Author; };
@ -52,8 +54,6 @@ namespace osu.Desktop.VisualTests.Tests
AddButton(@"Sort by Title", OnTitle);
AddButton(@"Sort by Author", OnAuthor);
AddButton(@"Sort by Difficulty", OnDifficulty);
Add(SongSelect);
}
protected override void Dispose(bool isDisposing)

View File

@ -56,7 +56,15 @@ namespace osu.Game.Screens.Select
private FilterControl filter;
public FilterControl Filter {
get; private set;
get {
return filter;
}
private set {
if (filter != value) {
filter = value;
filterChanged();
}
}
}
Player player;