Skip to content

Commit

Permalink
Integrate daily challenge streak display with user profile overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
frenzibyte committed Jul 28, 2024
1 parent 17f5d58 commit e82c54a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 11 deletions.
9 changes: 9 additions & 0 deletions osu.Game.Tests/Visual/Online/TestSceneUserProfileOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,15 @@ public void TestCustomColourSchemeWithReload()
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",
Colour = "ff0000",
Achievements = Array.Empty<APIUserAchievement>(),
Expand Down
41 changes: 30 additions & 11 deletions osu.Game/Overlays/Profile/Header/Components/MainDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,41 @@ private void load()
Spacing = new Vector2(0, 15),
Children = new Drawable[]
{
new FillFlowContainer
new GridContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(20),
Children = new Drawable[]
ColumnDimensions = new[]
{
detailGlobalRank = new ProfileValueDisplay(true)
{
Title = UsersStrings.ShowRankGlobalSimple,
},
detailCountryRank = 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.ShowRankCountrySimple,
},
detailGlobalRank = new ProfileValueDisplay(true)
{
Title = UsersStrings.ShowRankGlobalSimple,
},
Empty(),
detailCountryRank = new ProfileValueDisplay(true)
{
Title = UsersStrings.ShowRankCountrySimple,
},
new DailyChallengeStreakDisplay
{
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
User = { BindTarget = User },
}
}
}
},
new Container
Expand Down

0 comments on commit e82c54a

Please sign in to comment.