Split out if statement for readability

This commit is contained in:
Dean Herbert 2019-12-09 02:13:47 +09:00
parent 929be3e9e7
commit c2a40c574d
1 changed files with 5 additions and 2 deletions

View File

@ -52,11 +52,14 @@ private void load(OsuColour colours, IAPIProvider api)
{
var isOwnScore = api.LocalUser.Value.Id == score.UserID;
if (index % 2 != 0 && !isOwnScore)
if (isOwnScore)
background.Colour = colours.GreenDarker;
else if (index % 2 == 0)
background.Colour = colours.Gray3;
else
background.Alpha = 0;
hoveredBackground.Colour = isOwnScore ? colours.GreenDark : colours.Gray4;
background.Colour = isOwnScore ? colours.GreenDarker : colours.Gray3;
}
protected override bool OnHover(HoverEvent e)