mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 06:52:55 +08:00
Update login overlay background to conform to other overlays
This commit is contained in:
parent
25c9bf4061
commit
1058f434d7
@ -4,9 +4,10 @@
|
||||
#nullable disable
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Framework.Graphics.Effects;
|
||||
using osuTK.Graphics;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Graphics.Containers;
|
||||
@ -21,13 +22,24 @@ namespace osu.Game.Overlays
|
||||
|
||||
private const float transition_time = 400;
|
||||
|
||||
[Cached]
|
||||
private OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Purple);
|
||||
|
||||
public LoginOverlay()
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
Masking = true;
|
||||
EdgeEffect = new EdgeEffectParameters
|
||||
{
|
||||
Colour = Color4.Black.Opacity(0),
|
||||
Type = EdgeEffectType.Shadow,
|
||||
Radius = 10,
|
||||
Hollow = true,
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load()
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -40,8 +52,7 @@ namespace osu.Game.Overlays
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = Color4.Black,
|
||||
Alpha = 0.6f,
|
||||
Colour = colourProvider.Background4,
|
||||
},
|
||||
new Container
|
||||
{
|
||||
@ -50,23 +61,11 @@ namespace osu.Game.Overlays
|
||||
Masking = true,
|
||||
AutoSizeDuration = transition_time,
|
||||
AutoSizeEasing = Easing.OutQuint,
|
||||
Children = new Drawable[]
|
||||
Child = panel = new LoginPanel
|
||||
{
|
||||
panel = new LoginPanel
|
||||
{
|
||||
Padding = new MarginPadding(10),
|
||||
RequestHide = Hide,
|
||||
},
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Height = 3,
|
||||
Colour = colours.Yellow,
|
||||
Alpha = 1,
|
||||
},
|
||||
}
|
||||
Padding = new MarginPadding(10),
|
||||
RequestHide = Hide,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -77,6 +76,7 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
panel.Bounding = true;
|
||||
this.FadeIn(transition_time, Easing.OutQuint);
|
||||
FadeEdgeEffectTo(WaveContainer.SHADOW_OPACITY, WaveContainer.APPEAR_DURATION, Easing.Out);
|
||||
|
||||
ScheduleAfterChildren(() => GetContainingInputManager().ChangeFocus(panel));
|
||||
}
|
||||
@ -87,6 +87,7 @@ namespace osu.Game.Overlays
|
||||
|
||||
panel.Bounding = false;
|
||||
this.FadeOut(transition_time);
|
||||
FadeEdgeEffectTo(0, WaveContainer.DISAPPEAR_DURATION, Easing.In);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user