1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 07:23:14 +08:00

Merge pull request #4119 from peppy/remove-other-supporter-check

Remove remaining supporter check
This commit is contained in:
Dean Herbert 2019-01-23 00:35:46 +09:00 committed by GitHub
commit e54771c817
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
{ {
public class DownloadButton : HeaderButton, IHasTooltip public class DownloadButton : HeaderButton, IHasTooltip
{ {
public string TooltipText => Enabled ? null : "You gotta be an osu!supporter to download for now 'yo"; public string TooltipText => "Download this beatmap";
private readonly IBindable<User> localUser = new Bindable<User>(); private readonly IBindable<User> localUser = new Bindable<User>();
@ -101,12 +101,9 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
private void load(APIAccess api) private void load(APIAccess api)
{ {
localUser.BindTo(api.LocalUser); localUser.BindTo(api.LocalUser);
localUser.BindValueChanged(userChanged, true);
Enabled.BindValueChanged(enabledChanged, true); Enabled.BindValueChanged(enabledChanged, true);
} }
private void userChanged(User user) => Enabled.Value = user.IsSupporter;
private void enabledChanged(bool enabled) => this.FadeColour(enabled ? Color4.White : Color4.Gray, 200, Easing.OutQuint); private void enabledChanged(bool enabled) => this.FadeColour(enabled ? Color4.White : Color4.Gray, 200, Easing.OutQuint);
} }
} }