osu/osu.Game/Overlays/Changelog/ChangelogUpdateStreamItem.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
1.0 KiB
C#
Raw Normal View History

// 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.
2022-06-17 07:37:17 +00:00
#nullable disable
using Humanizer;
using osu.Framework.Localisation;
using osu.Game.Graphics;
using osu.Game.Online.API.Requests.Responses;
using osuTK.Graphics;
namespace osu.Game.Overlays.Changelog
{
2020-03-04 20:08:58 +00:00
public class ChangelogUpdateStreamItem : OverlayStreamItem<APIUpdateStream>
{
public ChangelogUpdateStreamItem(APIUpdateStream stream)
: base(stream)
{
2020-03-03 21:35:32 +00:00
if (stream.IsFeatured)
2020-03-03 21:40:10 +00:00
Width *= 2;
2020-03-03 14:10:25 +00:00
}
protected override LocalisableString MainText => Value.DisplayName;
protected override LocalisableString AdditionalText => Value.LatestBuild.DisplayVersion;
protected override LocalisableString InfoText => Value.LatestBuild.Users > 0 ? $"{"user".ToQuantity(Value.LatestBuild.Users, "N0")} online" : null;
protected override Color4 GetBarColour(OsuColour colours) => Value.Colour;
}
}