mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Implement OverlayUpdateStreamControl component
This commit is contained in:
25
osu.Game/Overlays/Changelog/ChangelogUpdateStreamItem.cs
Normal file
25
osu.Game/Overlays/Changelog/ChangelogUpdateStreamItem.cs
Normal file
@ -0,0 +1,25 @@
|
||||
// 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.Online.API.Requests.Responses;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.Changelog
|
||||
{
|
||||
public class ChangelogUpdateStreamItem : OverlayUpdateStreamItem<APIUpdateStream>
|
||||
{
|
||||
public ChangelogUpdateStreamItem(APIUpdateStream stream)
|
||||
: base(stream)
|
||||
{
|
||||
}
|
||||
|
||||
protected override string GetMainText() => Value.DisplayName;
|
||||
|
||||
protected override string GetAdditionalText() => Value.LatestBuild.DisplayVersion;
|
||||
|
||||
protected override string GetInfoText() => Value.LatestBuild.Users > 0 ? $"{"user".ToQuantity(Value.LatestBuild.Users, "N0")} online" : null;
|
||||
|
||||
protected override Color4 GetBarColour() => Value.Colour;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user