mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 09:57:21 +09:00
Link osu!supporter icon to its web page
This commit is contained in:
parent
e4aec3f519
commit
cd5e379c48
@ -5,22 +5,22 @@ using System;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Cursor;
|
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Resources.Localisation.Web;
|
using osu.Game.Resources.Localisation.Web;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Profile.Header.Components
|
namespace osu.Game.Overlays.Profile.Header.Components
|
||||||
{
|
{
|
||||||
public class SupporterIcon : CompositeDrawable, IHasTooltip
|
public class SupporterIcon : OsuClickableContainer
|
||||||
{
|
{
|
||||||
private readonly Box background;
|
private readonly Box background;
|
||||||
private readonly FillFlowContainer iconContainer;
|
private readonly FillFlowContainer iconContainer;
|
||||||
private readonly CircularContainer content;
|
private readonly CircularContainer content;
|
||||||
|
|
||||||
public LocalisableString TooltipText => UsersStrings.ShowIsSupporter;
|
public override LocalisableString TooltipText => UsersStrings.ShowIsSupporter;
|
||||||
|
|
||||||
public int SupportLevel
|
public int SupportLevel
|
||||||
{
|
{
|
||||||
@ -56,7 +56,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
|||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.X;
|
AutoSizeAxes = Axes.X;
|
||||||
|
|
||||||
InternalChild = content = new CircularContainer
|
Child = content = new CircularContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
AutoSizeAxes = Axes.X,
|
AutoSizeAxes = Axes.X,
|
||||||
@ -78,10 +78,12 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours, OsuGame game)
|
||||||
{
|
{
|
||||||
background.Colour = colours.Pink;
|
background.Colour = colours.Pink;
|
||||||
|
|
||||||
|
Action = () => game?.OpenUrlExternally(@"/home/support");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user