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