mirror of
https://github.com/ppy/osu
synced 2024-12-25 00:02:48 +00:00
29 lines
956 B
C#
29 lines
956 B
C#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
using Humanizer;
|
|
using osu.Game.Graphics;
|
|
using osu.Game.Online.API.Requests.Responses;
|
|
using osuTK.Graphics;
|
|
|
|
namespace osu.Game.Overlays.Changelog
|
|
{
|
|
public class ChangelogUpdateStreamItem : OverlayStreamItem<APIUpdateStream>
|
|
{
|
|
public ChangelogUpdateStreamItem(APIUpdateStream stream)
|
|
: base(stream)
|
|
{
|
|
if (stream.IsFeatured)
|
|
Width *= 2;
|
|
}
|
|
|
|
protected override string MainText => Value.DisplayName;
|
|
|
|
protected override string AdditionalText => Value.LatestBuild.DisplayVersion;
|
|
|
|
protected override string InfoText => Value.LatestBuild.Users > 0 ? $"{"user".ToQuantity(Value.LatestBuild.Users, "N0")} online" : null;
|
|
|
|
protected override Color4 GetBarColour(OsuColour colours) => Value.Colour;
|
|
}
|
|
}
|