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