mirror of
https://github.com/ppy/osu.git
synced 2025-01-18 05:42:56 +08:00
limit to 20 pages for kudosu scope
This commit is contained in:
parent
2c256475e0
commit
6af7a8f2bd
@ -62,13 +62,18 @@ namespace osu.Game.Tests.Visual.Online
|
||||
[Test]
|
||||
public void TestPageSelection()
|
||||
{
|
||||
AddStep("Set score to performance", () => scope.Value = RankingsScope.Performance);
|
||||
AddStep("Set scope to performance", () => scope.Value = RankingsScope.Performance);
|
||||
AddStep("Move to next page", () => rankingsOverlay.Header.CurrentPage.Value += 1);
|
||||
AddStep("Switch to another scope", () => scope.Value = RankingsScope.Score);
|
||||
AddAssert("Check page is first one", () => rankingsOverlay.Header.CurrentPage.Value == 0);
|
||||
AddStep("Move to next page", () => rankingsOverlay.Header.CurrentPage.Value += 1);
|
||||
AddStep("Switch to another ruleset", () => rankingsOverlay.Header.Ruleset.Value = new ManiaRuleset().RulesetInfo);
|
||||
AddAssert("Check page is first one", () => rankingsOverlay.Header.CurrentPage.Value == 0);
|
||||
|
||||
AddStep("Set scope to kudosu", () => scope.Value = RankingsScope.Kudosu);
|
||||
AddAssert("Check available pages is 20", () => rankingsOverlay.Header.AvailablesPages.Value == 20);
|
||||
AddStep("Set scope to performance", () => scope.Value = RankingsScope.Performance);
|
||||
AddAssert("Check available pages is 200", () => rankingsOverlay.Header.AvailablesPages.Value == 200);
|
||||
}
|
||||
|
||||
private void loadRankingsOverlay()
|
||||
|
@ -86,6 +86,9 @@ namespace osu.Game.Overlays
|
||||
if (Header.Current.Value != RankingsScope.Performance)
|
||||
Country.SetDefault();
|
||||
|
||||
// Kudosu scope have only 20 fetchable pages.
|
||||
Header.AvailablesPages.Value = tab == RankingsScope.Kudosu ? 20 : 200;
|
||||
|
||||
// Hide page selection for spotlights scope
|
||||
Header.ShowPageSelector(tab != RankingsScope.Spotlights);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user