diff --git a/osu.Game.Tests/Visual/SongSelect/TestSceneLeaderboardScoreV2.cs b/osu.Game.Tests/Visual/SongSelect/TestSceneLeaderboardScoreV2.cs index 1ea461be53..2a6203f2d8 100644 --- a/osu.Game.Tests/Visual/SongSelect/TestSceneLeaderboardScoreV2.cs +++ b/osu.Game.Tests/Visual/SongSelect/TestSceneLeaderboardScoreV2.cs @@ -39,6 +39,7 @@ namespace osu.Game.Tests.Visual.SongSelect Id = 6602580, Username = @"waaiiru", CountryCode = CountryCode.ES, + CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c1.jpg", }, }, new ScoreInfo @@ -55,6 +56,7 @@ namespace osu.Game.Tests.Visual.SongSelect Id = 1541390, Username = @"Toukai", CountryCode = CountryCode.CA, + CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c2.jpg", }, }, @@ -68,8 +70,7 @@ namespace osu.Game.Tests.Visual.SongSelect Ruleset = new ManiaRuleset().RulesetInfo, User = new APIUser { - Id = 4608074, - Username = @"Skycries", + Username = @"No cover", CountryCode = CountryCode.BR, }, }, @@ -86,7 +87,8 @@ namespace osu.Game.Tests.Visual.SongSelect { new LeaderboardScoreV2(scores[0], 1), new LeaderboardScoreV2(scores[1], null, true), - new LeaderboardScoreV2(scores[2], null, true) + new LeaderboardScoreV2(scores[2], null, true), + new LeaderboardScoreV2(scores[2], null), } }; diff --git a/osu.Game/Online/Leaderboards/LeaderboardScoreV2.cs b/osu.Game/Online/Leaderboards/LeaderboardScoreV2.cs index 362eb9ea82..22efe3b88c 100644 --- a/osu.Game/Online/Leaderboards/LeaderboardScoreV2.cs +++ b/osu.Game/Online/Leaderboards/LeaderboardScoreV2.cs @@ -7,6 +7,7 @@ using System.Linq; using osu.Framework.Allocation; using osu.Framework.Extensions.LocalisationExtensions; using osu.Framework.Graphics; +using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Effects; @@ -26,6 +27,7 @@ using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.UI; using osu.Game.Scoring; using osu.Game.Screens.Select; +using osu.Game.Users; using osu.Game.Users.Drawables; using osu.Game.Utils; using osuTK; @@ -164,6 +166,12 @@ namespace osu.Game.Online.Leaderboards RelativeSizeAxes = Axes.Both, Colour = foregroundColour }, + new UserCoverBackground + { + RelativeSizeAxes = Axes.Both, + User = score.User, + Colour = ColourInfo.GradientHorizontal(Colour4.White.Opacity(0.5f), Colour4.White.Opacity(0)), + }, avatar = new MaskedWrapper( innerAvatar = new ClickableAvatar(user) {