mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Fix UserTopScoreContainer is also tinted
This commit is contained in:
@ -38,6 +38,7 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
|
|
||||||
private readonly ScoreInfo score;
|
private readonly ScoreInfo score;
|
||||||
private readonly int rank;
|
private readonly int rank;
|
||||||
|
private readonly bool canHighlighted;
|
||||||
|
|
||||||
private Box background;
|
private Box background;
|
||||||
private Container content;
|
private Container content;
|
||||||
@ -50,10 +51,11 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
|
|
||||||
private List<ScoreComponentLabel> statisticsLabels;
|
private List<ScoreComponentLabel> statisticsLabels;
|
||||||
|
|
||||||
public LeaderboardScore(ScoreInfo score, int rank)
|
public LeaderboardScore(ScoreInfo score, int rank, bool canHighlighted = true)
|
||||||
{
|
{
|
||||||
this.score = score;
|
this.score = score;
|
||||||
this.rank = rank;
|
this.rank = rank;
|
||||||
|
this.canHighlighted = canHighlighted;
|
||||||
|
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Height = HEIGHT;
|
Height = HEIGHT;
|
||||||
@ -101,7 +103,7 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
background = new Box
|
background = new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = user.Id == api.LocalUser.Value.Id ? colour.YellowLight : Color4.Black,
|
Colour = user.Id == api.LocalUser.Value.Id && canHighlighted ? colour.YellowLight : Color4.Black,
|
||||||
Alpha = background_alpha,
|
Alpha = background_alpha,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -77,7 +77,7 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
if (newScore == null)
|
if (newScore == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
LoadComponentAsync(new LeaderboardScore(newScore.Score, newScore.Position)
|
LoadComponentAsync(new LeaderboardScore(newScore.Score, newScore.Position, false)
|
||||||
{
|
{
|
||||||
Action = () => ScoreSelected?.Invoke(newScore.Score)
|
Action = () => ScoreSelected?.Invoke(newScore.Score)
|
||||||
}, drawableScore =>
|
}, drawableScore =>
|
||||||
|
Reference in New Issue
Block a user