1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 23:12:56 +08:00

Move placeholder data into load method.

This commit is contained in:
Huo Yaoyuan 2017-06-15 08:27:02 +08:00
parent 4c8658980b
commit 0c9ccaec95
2 changed files with 13 additions and 7 deletions

View File

@ -26,7 +26,7 @@ namespace osu.Game.Users.Profile
private readonly Sprite levelBadge; private readonly Sprite levelBadge;
private readonly SpriteText levelText; private readonly SpriteText levelText;
private readonly GradeBadge gradeSSPlus, gradeSS, gradeSPlus, gradeS, gradeA; private readonly GradeBadge gradeDoubleSPlus, gradeDoubleS, gradeSPlus, gradeS, gradeA;
private const float cover_height = 350, info_height = 150, avatar_size = 110, avatar_bottom_position = -20, level_position = 30, level_height = 60; private const float cover_height = 350, info_height = 150, avatar_size = 110, avatar_bottom_position = -20, level_position = 30, level_height = 60;
public ProfileHeader(User user) public ProfileHeader(User user)
@ -193,8 +193,8 @@ namespace osu.Game.Users.Profile
Spacing = new Vector2(20, 0), Spacing = new Vector2(20, 0),
Children = new[] Children = new[]
{ {
gradeSSPlus = new GradeBadge("SSPlus") { Count = 12 }, gradeDoubleSPlus = new GradeBadge("SSPlus"),
gradeSS = new GradeBadge("SS") { Count = 34 }, gradeDoubleS = new GradeBadge("SS"),
} }
}, },
new FillFlowContainer<GradeBadge> new FillFlowContainer<GradeBadge>
@ -207,9 +207,9 @@ namespace osu.Game.Users.Profile
Spacing = new Vector2(20, 0), Spacing = new Vector2(20, 0),
Children = new[] Children = new[]
{ {
gradeSPlus = new GradeBadge("SPlus") { Count = 567 }, gradeSPlus = new GradeBadge("SPlus"),
gradeS = new GradeBadge("S") { Count = 890 }, gradeS = new GradeBadge("S"),
gradeA = new GradeBadge("A") { Count = 1234 }, gradeA = new GradeBadge("A"),
} }
} }
} }
@ -286,6 +286,12 @@ namespace osu.Game.Users.Profile
scoreNumberText.Add(createScoreNumberText("2,056")); scoreNumberText.Add(createScoreNumberText("2,056"));
scoreText.Add(createScoreText("Replay Watched")); scoreText.Add(createScoreText("Replay Watched"));
scoreNumberText.Add(createScoreNumberText("23")); scoreNumberText.Add(createScoreNumberText("23"));
gradeDoubleSPlus.Count = 12;
gradeDoubleS.Count = 34;
gradeSPlus.Count = 567;
gradeS.Count = 890;
gradeA.Count = 1234;
} }
private OsuSpriteText createScoreText(string text) => new OsuSpriteText private OsuSpriteText createScoreText(string text) => new OsuSpriteText

View File

@ -73,7 +73,7 @@ namespace osu.Game.Users.Profile
{ {
rankText.Text = $"#{rank:#,#}"; rankText.Text = $"#{rank:#,#}";
performanceText.Text = $"{performance:#,#}pp"; performanceText.Text = $"{performance:#,#}pp";
relativeText.Text = $"{this.user.Country?.FullName} #{countryRank:#,#}"; relativeText.Text = $"{user.Country?.FullName} #{countryRank:#,#}";
} }
private void showHistoryRankTexts(int dayIndex) private void showHistoryRankTexts(int dayIndex)