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

Don't show the supporter text if the user already has supporter status

This commit is contained in:
jorolf 2019-02-25 23:44:43 +01:00
parent e174fa2d3e
commit c680d63694

View File

@ -10,6 +10,7 @@ using osu.Framework.Graphics.Sprites;
using osu.Framework.Screens;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Online.API;
using osuTK;
using osuTK.Graphics;
using osu.Game.Overlays;
@ -39,7 +40,7 @@ namespace osu.Game.Screens.Menu
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
private void load(OsuColour colours, APIAccess api)
{
InternalChildren = new Drawable[]
{
@ -107,6 +108,12 @@ namespace osu.Game.Screens.Menu
t.Origin = Anchor.Centre;
}).First());
api.LocalUser.BindValueChanged(user =>
{
if (user.IsSupporter)
textFlow.RemoveRange(supporterDrawables);
}, true);
iconColour = colours.Yellow;
}