2017-04-11 05:01:13 +00:00
|
|
|
// 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.Sprites;
|
2017-04-18 06:16:50 +00:00
|
|
|
using osu.Game.Beatmaps;
|
2017-04-11 05:01:13 +00:00
|
|
|
using osu.Game.Graphics;
|
2017-04-18 06:16:50 +00:00
|
|
|
using osu.Game.Rulesets.Scoring;
|
2017-04-11 05:01:13 +00:00
|
|
|
using OpenTK;
|
|
|
|
using OpenTK.Graphics;
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.Ranking
|
|
|
|
{
|
|
|
|
internal class ResultsPage : Container
|
|
|
|
{
|
2017-04-11 06:56:52 +00:00
|
|
|
protected readonly Score Score;
|
2017-04-18 06:16:50 +00:00
|
|
|
protected readonly WorkingBeatmap Beatmap;
|
2017-04-11 05:01:13 +00:00
|
|
|
private CircularContainer content;
|
|
|
|
private Box fill;
|
|
|
|
|
|
|
|
protected override Container<Drawable> Content => content;
|
|
|
|
|
2017-04-18 06:16:50 +00:00
|
|
|
public ResultsPage(Score score, WorkingBeatmap beatmap)
|
2017-04-11 05:01:13 +00:00
|
|
|
{
|
|
|
|
Score = score;
|
2017-04-11 06:56:52 +00:00
|
|
|
Beatmap = beatmap;
|
2017-04-11 05:01:13 +00:00
|
|
|
RelativeSizeAxes = Axes.Both;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override void LoadComplete()
|
|
|
|
{
|
|
|
|
base.LoadComplete();
|
|
|
|
fill.Delay(400);
|
|
|
|
fill.FadeInFromZero(600);
|
|
|
|
}
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load(OsuColour colours)
|
|
|
|
{
|
|
|
|
AddInternal(new Drawable[]
|
|
|
|
{
|
|
|
|
fill = new Box
|
|
|
|
{
|
|
|
|
Alpha = 0,
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
Colour = colours.Gray6
|
|
|
|
},
|
|
|
|
new CircularContainer
|
|
|
|
{
|
|
|
|
EdgeEffect = new EdgeEffect
|
|
|
|
{
|
2017-04-18 12:35:11 +00:00
|
|
|
Colour = colours.GrayF.Opacity(0.8f),
|
2017-04-11 05:01:13 +00:00
|
|
|
Type = EdgeEffectType.Shadow,
|
2017-04-18 12:35:11 +00:00
|
|
|
Radius = 1,
|
2017-04-11 05:01:13 +00:00
|
|
|
},
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
Masking = true,
|
|
|
|
BorderThickness = 20,
|
|
|
|
BorderColour = Color4.White,
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
Children = new Drawable[]
|
|
|
|
{
|
|
|
|
new Box{
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
Alpha = 0,
|
|
|
|
AlwaysPresent = true
|
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
content = new CircularContainer
|
|
|
|
{
|
|
|
|
EdgeEffect = new EdgeEffect
|
|
|
|
{
|
2017-04-18 12:35:11 +00:00
|
|
|
Colour = Color4.Black.Opacity(0.2f),
|
2017-04-11 05:01:13 +00:00
|
|
|
Type = EdgeEffectType.Shadow,
|
|
|
|
Radius = 15,
|
|
|
|
},
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
Masking = true,
|
|
|
|
Size = new Vector2(0.88f),
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2017-04-18 12:35:11 +00:00
|
|
|
}
|