1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-09 09:20:05 +08:00
osu-lazer/osu.Game/Overlays/Profile/Header/Components/FollowersButton.cs

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

28 lines
1.0 KiB
C#
Raw Normal View History

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