1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 05:17:29 +08:00
osu-lazer/osu.Game/Overlays/Profile/Header/Components/MappingSubscribersButton.cs
2022-11-27 00:00:27 +09:00

30 lines
971 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.
#nullable disable
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Resources.Localisation.Web;
namespace osu.Game.Overlays.Profile.Header.Components
{
public partial class MappingSubscribersButton : ProfileHeaderStatisticsButton
{
public readonly Bindable<APIUser> User = new Bindable<APIUser>();
public override LocalisableString TooltipText => FollowsStrings.MappingFollowers;
protected override IconUsage Icon => FontAwesome.Solid.Bell;
[BackgroundDependencyLoader]
private void load()
{
User.BindValueChanged(user => SetValue(user.NewValue?.MappingFollowerCount ?? 0), true);
}
}
}