mirror of
https://github.com/ppy/osu
synced 2024-12-15 03:16:17 +00:00
Add triangles
This commit is contained in:
parent
dbf53e9bda
commit
4cd3b15f6e
@ -4,11 +4,14 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Colour;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Graphics.Backgrounds;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Profile
|
namespace osu.Game.Overlays.Profile
|
||||||
{
|
{
|
||||||
@ -36,6 +39,11 @@ namespace osu.Game.Overlays.Profile
|
|||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
},
|
},
|
||||||
|
new SectionTriangles
|
||||||
|
{
|
||||||
|
Anchor = Anchor.BottomCentre,
|
||||||
|
Origin = Anchor.BottomCentre,
|
||||||
|
},
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
@ -74,5 +82,42 @@ namespace osu.Game.Overlays.Profile
|
|||||||
{
|
{
|
||||||
background.Colour = colours.GreySeafoamDarker;
|
background.Colour = colours.GreySeafoamDarker;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class SectionTriangles : Container
|
||||||
|
{
|
||||||
|
private readonly Triangles triangles;
|
||||||
|
private readonly Box foreground;
|
||||||
|
|
||||||
|
public SectionTriangles()
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X;
|
||||||
|
Height = 100;
|
||||||
|
Masking = true;
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
triangles = new Triangles
|
||||||
|
{
|
||||||
|
Anchor = Anchor.BottomCentre,
|
||||||
|
Origin = Anchor.BottomCentre,
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Height = 0.95f,
|
||||||
|
TriangleScale = 4,
|
||||||
|
Velocity = 0.5f,
|
||||||
|
},
|
||||||
|
foreground = new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours)
|
||||||
|
{
|
||||||
|
triangles.ColourLight = colours.GreySeafoamDark;
|
||||||
|
triangles.ColourDark = colours.GreySeafoamDarker;
|
||||||
|
foreground.Colour = ColourInfo.GradientVertical(colours.GreySeafoamDarker, new Color4(0,0,0,0));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user