1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-16 09:22:58 +08:00
osu-lazer/osu.Game/Screens/Ranking/ResultsPage.cs

92 lines
3.0 KiB
C#
Raw Normal View History

// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Rulesets.Scoring;
using OpenTK;
using OpenTK.Graphics;
namespace osu.Game.Screens.Ranking
{
internal class ResultsPage : Container
{
protected readonly Score Score;
protected readonly WorkingBeatmap Beatmap;
private CircularContainer content;
private Box fill;
protected override Container<Drawable> Content => content;
public ResultsPage(Score score, WorkingBeatmap beatmap)
{
Score = score;
Beatmap = beatmap;
RelativeSizeAxes = Axes.Both;
}
protected override void LoadComplete()
{
base.LoadComplete();
fill.Delay(400).FadeInFromZero(600);
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
2017-07-11 21:58:06 +08:00
AddRangeInternal(new Drawable[]
{
fill = new Box
{
Alpha = 0,
RelativeSizeAxes = Axes.Both,
Colour = colours.Gray6
},
new CircularContainer
{
2017-06-12 11:48:47 +08:00
EdgeEffect = new EdgeEffectParameters
{
2017-04-18 20:35:11 +08:00
Colour = colours.GrayF.Opacity(0.8f),
Type = EdgeEffectType.Shadow,
2017-04-18 20:35:11 +08:00
Radius = 1,
},
RelativeSizeAxes = Axes.Both,
Masking = true,
BorderThickness = 20,
BorderColour = Color4.White,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Children = new Drawable[]
{
2017-06-08 14:35:10 +08:00
new Box
{
RelativeSizeAxes = Axes.Both,
Alpha = 0,
AlwaysPresent = true
},
}
},
content = new CircularContainer
{
2017-06-12 11:48:47 +08:00
EdgeEffect = new EdgeEffectParameters
{
2017-04-18 20:35:11 +08:00
Colour = Color4.Black.Opacity(0.2f),
Type = EdgeEffectType.Shadow,
Radius = 15,
},
RelativeSizeAxes = Axes.Both,
Masking = true,
Size = new Vector2(0.88f),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
}
});
}
}
2017-04-18 20:35:11 +08:00
}