1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-17 12:22:55 +08:00
osu-lazer/osu.Game/Overlays/Profile/Header/SupporterIcon.cs

65 lines
2.1 KiB
C#
Raw Normal View History

// 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.
2018-04-13 17:19:50 +08:00
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Graphics.Backgrounds;
2018-11-20 15:51:59 +08:00
using osuTK;
2018-04-13 17:19:50 +08:00
2018-04-16 05:44:59 +08:00
namespace osu.Game.Overlays.Profile.Header
2018-04-13 17:19:50 +08:00
{
public class SupporterIcon : CircularContainer, IHasTooltip
{
private readonly Box background;
public string TooltipText => "osu!supporter";
public SupporterIcon()
{
Masking = true;
Children = new Drawable[]
{
2019-02-28 12:31:40 +08:00
new Box { RelativeSizeAxes = Axes.Both },
new CircularContainer
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
Scale = new Vector2(0.8f),
Masking = true,
Children = new Drawable[]
2018-04-13 17:19:50 +08:00
{
2019-02-28 12:31:40 +08:00
background = new Box { RelativeSizeAxes = Axes.Both },
new Triangles
2018-04-13 17:19:50 +08:00
{
2019-02-28 12:31:40 +08:00
TriangleScale = 0.2f,
ColourLight = OsuColour.FromHex(@"ff7db7"),
ColourDark = OsuColour.FromHex(@"de5b95"),
RelativeSizeAxes = Axes.Both,
Velocity = 0.3f,
},
2018-04-13 17:19:50 +08:00
}
2019-02-28 12:31:40 +08:00
},
new SpriteIcon
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
Icon = FontAwesome.fa_heart,
Scale = new Vector2(0.45f),
}
2018-04-13 17:19:50 +08:00
};
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
background.Colour = colours.Pink;
}
}
}