1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-18 10:53:21 +08:00

Merge pull request #31240 from Plextora/colour-for-friend-lb

Make the score background yellow for friends on the leaderboard
This commit is contained in:
Dan Balasescu 2025-01-14 20:11:37 +09:00 committed by GitHub
commit 1e45aa7fbe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -101,6 +101,7 @@ namespace osu.Game.Online.Leaderboards
private void load(IAPIProvider api, OsuColour colour)
{
var user = Score.User;
bool isUserFriend = api.Friends.Any(friend => friend.TargetID == user.OnlineID);
statisticsLabels = GetStatistics(Score).Select(s => new ScoreComponentLabel(s)).ToList();
@ -129,7 +130,7 @@ namespace osu.Game.Online.Leaderboards
background = new Box
{
RelativeSizeAxes = Axes.Both,
Colour = user.OnlineID == api.LocalUser.Value.Id && isOnlineScope ? colour.Green : Color4.Black,
Colour = isUserFriend ? colour.Yellow : (user.OnlineID == api.LocalUser.Value.Id && isOnlineScope ? colour.Green : Color4.Black),
Alpha = background_alpha,
},
},