1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-11 18:57:19 +08:00

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

31 lines
1.0 KiB
C#
Raw Normal View History

2019-04-26 13:29:58 +09: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 16:37:17 +09:00
#nullable disable
2019-04-26 13:29:58 +09:00
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Online.API.Requests.Responses;
2021-07-17 15:18:45 +02:00
using osu.Game.Resources.Localisation.Web;
2019-04-26 13:29:58 +09:00
2019-04-26 13:49:44 +09:00
namespace osu.Game.Overlays.Profile.Header.Components
2019-04-26 13:29:58 +09:00
{
public class FollowersButton : ProfileHeaderStatisticsButton
2019-04-26 13:29:58 +09:00
{
public readonly Bindable<APIUser> User = new Bindable<APIUser>();
2019-04-26 13:29:58 +09:00
2021-07-17 15:18:45 +02:00
public override LocalisableString TooltipText => FriendsStrings.ButtonsDisabled;
2019-04-26 13:29:58 +09:00
2021-01-21 23:39:19 +03:00
protected override IconUsage Icon => FontAwesome.Solid.User;
2019-04-26 13:29:58 +09:00
[BackgroundDependencyLoader]
private void load()
{
// todo: when friending/unfriending is implemented, the APIAccess.Friends list should be updated accordingly.
User.BindValueChanged(user => SetValue(user.NewValue?.FollowerCount ?? 0), true);
2019-04-26 13:29:58 +09:00
}
}
}