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:
commit
1e45aa7fbe
@ -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,
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user