1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 11:53:21 +08:00
This commit is contained in:
Andrei Zavatski 2019-07-14 16:16:21 +03:00
parent 963e025bb8
commit ecf0e62484
3 changed files with 11 additions and 13 deletions

View File

@ -16,11 +16,10 @@ namespace osu.Game.Tests.Visual.SongSelect
{
public class TestSceneUserTopScore : OsuTestScene
{
private readonly UserTopScoreContainer topScoreContainer;
private readonly APILegacyUserTopScoreInfo[] scores;
public TestSceneUserTopScore()
{
UserTopScoreContainer topScoreContainer;
Add(new Container
{
Origin = Anchor.BottomCentre,
@ -42,13 +41,7 @@ namespace osu.Game.Tests.Visual.SongSelect
}
});
AddStep(@"Trigger visibility", topScoreContainer.ToggleVisibility);
AddStep(@"Add score(rank 999)", () => topScoreContainer.Score.Value = scores[0]);
AddStep(@"Add score(rank 110000)", () => topScoreContainer.Score.Value = scores[1]);
AddStep(@"Add score(rank 22333)", () => topScoreContainer.Score.Value = scores[2]);
AddStep(@"Add null score", () => topScoreContainer.Score.Value = null);
scores = new APILegacyUserTopScoreInfo[]
APILegacyUserTopScoreInfo[] scores = new[]
{
new APILegacyUserTopScoreInfo
{
@ -115,6 +108,12 @@ namespace osu.Game.Tests.Visual.SongSelect
}
}
};
AddStep(@"Trigger visibility", topScoreContainer.ToggleVisibility);
AddStep(@"Add score(rank 999)", () => topScoreContainer.Score.Value = scores[0]);
AddStep(@"Add score(rank 110000)", () => topScoreContainer.Score.Value = scores[1]);
AddStep(@"Add score(rank 22333)", () => topScoreContainer.Score.Value = scores[2]);
AddStep(@"Add null score", () => topScoreContainer.Score.Value = null);
}
}
}

View File

@ -4,7 +4,6 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Beatmaps;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Screens.Select.Details;
using osu.Game.Screens.Select.Leaderboards;
@ -65,7 +64,7 @@ namespace osu.Game.Screens.Select
Child = new GridContainer
{
RelativeSizeAxes = Axes.Both,
RowDimensions = new Dimension[]
RowDimensions = new[]
{
new Dimension(GridSizeMode.Distributed),
new Dimension(GridSizeMode.AutoSize),

View File

@ -58,7 +58,7 @@ namespace osu.Game.Screens.Select.Details
}
};
Score.BindValueChanged((score) => onScoreChanged(score.NewValue));
Score.BindValueChanged(score => onScoreChanged(score.NewValue));
}
private void onScoreChanged(APILegacyUserTopScoreInfo score)