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

Integrate daily challenge streak display with user profile overlay

This commit is contained in:
Salman Ahmed 2024-07-28 05:57:30 +03:00
parent 17f5d58be2
commit e82c54a31c
2 changed files with 39 additions and 11 deletions

View File

@ -282,6 +282,15 @@ namespace osu.Game.Tests.Visual.Online
ImageUrlLowRes = "https://assets.ppy.sh/profile-badges/contributor.png", ImageUrlLowRes = "https://assets.ppy.sh/profile-badges/contributor.png",
}, },
}, },
DailyChallengeStatistics = new APIUserDailyChallengeStatistics
{
DailyStreakCurrent = 231,
WeeklyStreakCurrent = 18,
DailyStreakBest = 370,
WeeklyStreakBest = 51,
Top10PercentPlacements = 345,
Top50PercentPlacements = 427,
},
Title = "osu!volunteer", Title = "osu!volunteer",
Colour = "ff0000", Colour = "ff0000",
Achievements = Array.Empty<APIUserAchievement>(), Achievements = Array.Empty<APIUserAchievement>(),

View File

@ -44,22 +44,41 @@ namespace osu.Game.Overlays.Profile.Header.Components
Spacing = new Vector2(0, 15), Spacing = new Vector2(0, 15),
Children = new Drawable[] Children = new Drawable[]
{ {
new FillFlowContainer new GridContainer
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
Direction = FillDirection.Horizontal, ColumnDimensions = new[]
Spacing = new Vector2(20),
Children = new Drawable[]
{ {
detailGlobalRank = new ProfileValueDisplay(true) new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.Absolute, 20),
new Dimension(),
new Dimension(GridSizeMode.AutoSize),
},
RowDimensions = new[]
{
new Dimension(GridSizeMode.AutoSize),
},
Content = new[]
{
new[]
{ {
Title = UsersStrings.ShowRankGlobalSimple, detailGlobalRank = new ProfileValueDisplay(true)
}, {
detailCountryRank = new ProfileValueDisplay(true) Title = UsersStrings.ShowRankGlobalSimple,
{ },
Title = UsersStrings.ShowRankCountrySimple, Empty(),
}, detailCountryRank = new ProfileValueDisplay(true)
{
Title = UsersStrings.ShowRankCountrySimple,
},
new DailyChallengeStreakDisplay
{
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
User = { BindTarget = User },
}
}
} }
}, },
new Container new Container