Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust weight and text in event feed output #29112

Merged
merged 2 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,14 @@ private void load(OsuColour colours)
},
text = new LinkFlowContainer(t =>
{
t.Font = OsuFont.Default.With(weight: newScore.NewRank == null ? FontWeight.Medium : FontWeight.Bold);
FontWeight fontWeight = FontWeight.Medium;

if (newScore.NewRank < 100)
fontWeight = FontWeight.Bold;
else if (newScore.NewRank < 1000)
fontWeight = FontWeight.SemiBold;

t.Font = OsuFont.Default.With(weight: fontWeight);
t.Colour = newScore.NewRank < 10 ? colours.Orange1 : Colour4.White;
})
{
Expand All @@ -132,8 +139,8 @@ private void load(OsuColour colours)
};

text.AddUserLink(newScore.User);
text.AddText(" got ");
text.AddLink($"{newScore.TotalScore:N0} points", () => PresentScore?.Invoke(newScore.ScoreID));
text.AddText(" scored ");
text.AddLink($"{newScore.TotalScore:N0}", () => PresentScore?.Invoke(newScore.ScoreID));

if (newScore.NewRank != null)
text.AddText($" and achieved rank #{newScore.NewRank.Value:N0}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ protected override double GetProportionalDuration(long currentValue, long newVal
protected override OsuSpriteText CreateSpriteText() => new OsuSpriteText
{
Font = OsuFont.Default.With(size: 80f, fixedWidth: true),
Spacing = new Vector2(-2, 0)
Spacing = new Vector2(-4, 0)
};

protected override LocalisableString FormatCount(long count) => count.ToLocalisableString(@"N0");
Expand Down
Loading