1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 09:03:22 +08:00

Update Scores section

This commit is contained in:
Andrei Zavatski 2020-02-04 14:35:04 +03:00
parent 34091103e3
commit f30cdab025
5 changed files with 15 additions and 10 deletions

View File

@ -23,7 +23,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
{ {
private const float horizontal_inset = 20; private const float horizontal_inset = 20;
private const float row_height = 25; private const float row_height = 25;
private const int text_size = 14; private const int text_size = 12;
private readonly FillFlowContainer backgroundFlow; private readonly FillFlowContainer backgroundFlow;
@ -190,7 +190,13 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
public HeaderText(string text) public HeaderText(string text)
{ {
Text = text.ToUpper(); Text = text.ToUpper();
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Black); Font = OsuFont.GetFont(size: 10, weight: FontWeight.Bold);
}
[BackgroundDependencyLoader]
private void load(OverlayColourProvider colourProvider)
{
Colour = colourProvider.Foreground1;
} }
} }
} }

View File

@ -48,18 +48,18 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OsuColour colours, IAPIProvider api) private void load(OsuColour colours, OverlayColourProvider colourProvider, IAPIProvider api)
{ {
var isOwnScore = api.LocalUser.Value.Id == score.UserID; var isOwnScore = api.LocalUser.Value.Id == score.UserID;
if (isOwnScore) if (isOwnScore)
background.Colour = colours.GreenDarker; background.Colour = colours.GreenDarker;
else if (index % 2 == 0) else if (index % 2 == 0)
background.Colour = colours.Gray3; background.Colour = colourProvider.Background4;
else else
background.Alpha = 0; background.Alpha = 0;
hoveredBackground.Colour = isOwnScore ? colours.GreenDark : colours.Gray4; hoveredBackground.Colour = isOwnScore ? colours.GreenDark : colourProvider.Background3;
} }
protected override bool OnHover(HoverEvent e) protected override bool OnHover(HoverEvent e)

View File

@ -5,7 +5,6 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osuTK; using osuTK;
using System.Linq; using System.Linq;
@ -179,9 +178,9 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OsuColour colours) private void load(OverlayColourProvider colourProvider)
{ {
background.Colour = colours.Gray2; background.Colour = colourProvider.Background5;
user.BindTo(api.LocalUser); user.BindTo(api.LocalUser);
} }

View File

@ -130,7 +130,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
separator = new Box separator = new Box
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Height = 2 Height = 1
}, },
content content
} }

View File

@ -50,7 +50,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Font = OsuFont.GetFont(size: 18, weight: FontWeight.Bold, italics: true) Font = OsuFont.GetFont(size: 18, weight: FontWeight.Bold)
}, },
rank = new UpdateableRank(ScoreRank.D) rank = new UpdateableRank(ScoreRank.D)
{ {