2017-01-30 21:53:50 +08:00
|
|
|
|
//Copyright (c) 2007-2016 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.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
using osu.Framework.Graphics.Primitives;
|
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
|
|
|
|
using osu.Framework.Graphics.Transformations;
|
|
|
|
|
using osu.Game.Graphics;
|
2017-01-31 17:37:11 +08:00
|
|
|
|
using osu.Game.Overlays.Options.Sections.General;
|
2017-01-30 21:53:50 +08:00
|
|
|
|
using OpenTK;
|
|
|
|
|
using OpenTK.Graphics;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays
|
|
|
|
|
{
|
|
|
|
|
class LoginOverlay : OverlayContainer
|
|
|
|
|
{
|
|
|
|
|
private LoginOptions optionsSection;
|
|
|
|
|
|
2017-01-31 16:05:42 +08:00
|
|
|
|
const float transition_time = 400;
|
2017-01-31 15:42:46 +08:00
|
|
|
|
|
2017-01-30 21:53:50 +08:00
|
|
|
|
public LoginOverlay()
|
|
|
|
|
{
|
2017-01-31 15:42:46 +08:00
|
|
|
|
AutoSizeAxes = Axes.Both;
|
2017-01-30 21:53:50 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
|
private void load(OsuColour colours)
|
|
|
|
|
{
|
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
|
|
|
|
new Box {
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
Colour = Color4.Black,
|
2017-01-31 18:40:02 +08:00
|
|
|
|
Alpha = 0.6f,
|
2017-01-30 21:53:50 +08:00
|
|
|
|
},
|
2017-01-31 15:42:46 +08:00
|
|
|
|
new Container
|
2017-01-30 21:53:50 +08:00
|
|
|
|
{
|
2017-01-31 15:42:46 +08:00
|
|
|
|
Width = 360,
|
|
|
|
|
AutoSizeAxes = Axes.Y,
|
|
|
|
|
Masking = true,
|
|
|
|
|
AutoSizeDuration = transition_time,
|
|
|
|
|
AutoSizeEasing = EasingTypes.OutQuint,
|
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
|
|
|
|
optionsSection = new LoginOptions
|
|
|
|
|
{
|
|
|
|
|
Padding = new MarginPadding(10),
|
|
|
|
|
},
|
|
|
|
|
new Box
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
|
Anchor = Anchor.BottomLeft,
|
|
|
|
|
Origin = Anchor.BottomLeft,
|
|
|
|
|
Height = 3,
|
|
|
|
|
Colour = colours.Yellow,
|
|
|
|
|
Alpha = 1,
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-01-30 21:53:50 +08:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void PopIn()
|
|
|
|
|
{
|
2017-01-31 15:42:46 +08:00
|
|
|
|
optionsSection.Bounding = true;
|
|
|
|
|
FadeIn(transition_time, EasingTypes.OutQuint);
|
2017-01-30 21:53:50 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void PopOut()
|
|
|
|
|
{
|
2017-01-31 15:42:46 +08:00
|
|
|
|
optionsSection.Bounding = false;
|
2017-01-31 16:05:42 +08:00
|
|
|
|
FadeOut(transition_time);
|
2017-01-30 21:53:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|