mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 00:53:10 +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]
|
[Test]
|
||||||
public void TestPageSelection()
|
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("Move to next page", () => rankingsOverlay.Header.CurrentPage.Value += 1);
|
||||||
AddStep("Switch to another scope", () => scope.Value = RankingsScope.Score);
|
AddStep("Switch to another scope", () => scope.Value = RankingsScope.Score);
|
||||||
AddAssert("Check page is first one", () => rankingsOverlay.Header.CurrentPage.Value == 0);
|
AddAssert("Check page is first one", () => rankingsOverlay.Header.CurrentPage.Value == 0);
|
||||||
AddStep("Move to next page", () => rankingsOverlay.Header.CurrentPage.Value += 1);
|
AddStep("Move to next page", () => rankingsOverlay.Header.CurrentPage.Value += 1);
|
||||||
AddStep("Switch to another ruleset", () => rankingsOverlay.Header.Ruleset.Value = new ManiaRuleset().RulesetInfo);
|
AddStep("Switch to another ruleset", () => rankingsOverlay.Header.Ruleset.Value = new ManiaRuleset().RulesetInfo);
|
||||||
AddAssert("Check page is first one", () => rankingsOverlay.Header.CurrentPage.Value == 0);
|
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()
|
private void loadRankingsOverlay()
|
||||||
|
@ -86,6 +86,9 @@ namespace osu.Game.Overlays
|
|||||||
if (Header.Current.Value != RankingsScope.Performance)
|
if (Header.Current.Value != RankingsScope.Performance)
|
||||||
Country.SetDefault();
|
Country.SetDefault();
|
||||||
|
|
||||||
|
// Kudosu scope have only 20 fetchable pages.
|
||||||
|
Header.AvailablesPages.Value = tab == RankingsScope.Kudosu ? 20 : 200;
|
||||||
|
|
||||||
// Hide page selection for spotlights scope
|
// Hide page selection for spotlights scope
|
||||||
Header.ShowPageSelector(tab != RankingsScope.Spotlights);
|
Header.ShowPageSelector(tab != RankingsScope.Spotlights);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user