mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 16:37:26 +08:00
62 lines
2.1 KiB
C#
62 lines
2.1 KiB
C#
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|||
|
|
|||
|
using OpenTK;
|
|||
|
using osu.Framework.Allocation;
|
|||
|
using osu.Framework.Graphics;
|
|||
|
using osu.Framework.Graphics.Containers;
|
|||
|
using osu.Framework.Graphics.Shapes;
|
|||
|
using osu.Game.Graphics;
|
|||
|
using osu.Game.Graphics.Backgrounds;
|
|||
|
|
|||
|
namespace osu.Game.Overlays.Profile
|
|||
|
{
|
|||
|
public class SupporterIcon : CircularContainer
|
|||
|
{
|
|||
|
private readonly Box background;
|
|||
|
|
|||
|
public SupporterIcon()
|
|||
|
{
|
|||
|
Masking = true;
|
|||
|
Children = new Drawable[]
|
|||
|
{
|
|||
|
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[]
|
|||
|
{
|
|||
|
background = new Box { RelativeSizeAxes = Axes.Both },
|
|||
|
new Triangles
|
|||
|
{
|
|||
|
TriangleScale = 0.2f,
|
|||
|
ColourLight = OsuColour.FromHex(@"ff7db7"),
|
|||
|
ColourDark = OsuColour.FromHex(@"de5b95"),
|
|||
|
RelativeSizeAxes = Axes.Both,
|
|||
|
Velocity = 0.3f,
|
|||
|
},
|
|||
|
}
|
|||
|
},
|
|||
|
new SpriteIcon
|
|||
|
{
|
|||
|
Anchor = Anchor.Centre,
|
|||
|
Origin = Anchor.Centre,
|
|||
|
RelativeSizeAxes = Axes.Both,
|
|||
|
Icon = FontAwesome.fa_heart,
|
|||
|
Scale = new Vector2(0.45f),
|
|||
|
}
|
|||
|
};
|
|||
|
}
|
|||
|
|
|||
|
[BackgroundDependencyLoader]
|
|||
|
private void load(OsuColour colours)
|
|||
|
{
|
|||
|
background.Colour = colours.Pink;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|