mirror of https://github.com/ppy/osu
Move placeholder data into load method.
This commit is contained in:
parent
4c8658980b
commit
0c9ccaec95
|
@ -26,7 +26,7 @@ public class ProfileHeader : Container
|
|||
|
||||
private readonly Sprite levelBadge;
|
||||
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;
|
||||
public ProfileHeader(User user)
|
||||
|
@ -193,8 +193,8 @@ public ProfileHeader(User user)
|
|||
Spacing = new Vector2(20, 0),
|
||||
Children = new[]
|
||||
{
|
||||
gradeSSPlus = new GradeBadge("SSPlus") { Count = 12 },
|
||||
gradeSS = new GradeBadge("SS") { Count = 34 },
|
||||
gradeDoubleSPlus = new GradeBadge("SSPlus"),
|
||||
gradeDoubleS = new GradeBadge("SS"),
|
||||
}
|
||||
},
|
||||
new FillFlowContainer<GradeBadge>
|
||||
|
@ -207,9 +207,9 @@ public ProfileHeader(User user)
|
|||
Spacing = new Vector2(20, 0),
|
||||
Children = new[]
|
||||
{
|
||||
gradeSPlus = new GradeBadge("SPlus") { Count = 567 },
|
||||
gradeS = new GradeBadge("S") { Count = 890 },
|
||||
gradeA = new GradeBadge("A") { Count = 1234 },
|
||||
gradeSPlus = new GradeBadge("SPlus"),
|
||||
gradeS = new GradeBadge("S"),
|
||||
gradeA = new GradeBadge("A"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -286,6 +286,12 @@ private void load(TextureStore textures)
|
|||
scoreNumberText.Add(createScoreNumberText("2,056"));
|
||||
scoreText.Add(createScoreText("Replay Watched"));
|
||||
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
|
||||
|
|
|
@ -73,7 +73,7 @@ private void updateRankTexts()
|
|||
{
|
||||
rankText.Text = $"#{rank:#,#}";
|
||||
performanceText.Text = $"{performance:#,#}pp";
|
||||
relativeText.Text = $"{this.user.Country?.FullName} #{countryRank:#,#}";
|
||||
relativeText.Text = $"{user.Country?.FullName} #{countryRank:#,#}";
|
||||
}
|
||||
|
||||
private void showHistoryRankTexts(int dayIndex)
|
||||
|
|
Loading…
Reference in New Issue