Add a bit of smoothness to the rank graph

This commit is contained in:
EVAST9919
2019-05-24 19:43:53 +03:00
parent ffc7e32c26
commit cda97a61fa
2 changed files with 58 additions and 30 deletions

View File

@ -31,6 +31,7 @@ namespace osu.Game.Tests.Visual.Online
var data = new int[89];
var dataWithZeros = new int[89];
var smallData = new int[89];
var edgyData = new int[89];
for (int i = 0; i < 89; i++)
data[i] = dataWithZeros[i] = (i + 1) * 1000;
@ -41,6 +42,14 @@ namespace osu.Game.Tests.Visual.Online
for (int i = 79; i < 89; i++)
smallData[i] = 100000 - i * 1000;
bool edge = true;
for (int i = 0; i < 20; i++)
{
edgyData[i] = 100000 + (edge ? 1000 : -1000) * (i + 1);
edge = !edge;
}
Add(new Container
{
Anchor = Anchor.Centre,
@ -120,6 +129,22 @@ namespace osu.Game.Tests.Visual.Online
}
};
});
AddStep("graph with edges", () =>
{
graph.User.Value = new User
{
Statistics = new UserStatistics
{
Ranks = new UserStatistics.UserRanks { Global = 12000 },
PP = 12345,
},
RankHistory = new User.RankHistoryData
{
Data = edgyData,
}
};
});
}
}
}