mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 15:03:13 +08:00
Centralise definition of overlay shadow opacity and reduce slightly
This commit is contained in:
parent
02d8e3a11e
commit
e5451d1d79
@ -17,6 +17,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
{
|
{
|
||||||
public const float APPEAR_DURATION = 800;
|
public const float APPEAR_DURATION = 800;
|
||||||
public const float DISAPPEAR_DURATION = 500;
|
public const float DISAPPEAR_DURATION = 500;
|
||||||
|
public const float SHADOW_OPACITY = 0.2f;
|
||||||
|
|
||||||
private const Easing easing_show = Easing.OutSine;
|
private const Easing easing_show = Easing.OutSine;
|
||||||
private const Easing easing_hide = Easing.InSine;
|
private const Easing easing_hide = Easing.InSine;
|
||||||
|
@ -102,7 +102,7 @@ namespace osu.Game.Overlays
|
|||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
{
|
{
|
||||||
base.PopIn();
|
base.PopIn();
|
||||||
FadeEdgeEffectTo(0.4f, WaveContainer.APPEAR_DURATION, Easing.Out);
|
FadeEdgeEffectTo(WaveContainer.SHADOW_OPACITY, WaveContainer.APPEAR_DURATION, Easing.Out);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
|
@ -210,7 +210,7 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
this.MoveToX(0, TRANSITION_LENGTH, Easing.OutQuint);
|
this.MoveToX(0, TRANSITION_LENGTH, Easing.OutQuint);
|
||||||
mainContent.FadeTo(1, TRANSITION_LENGTH, Easing.OutQuint);
|
mainContent.FadeTo(1, TRANSITION_LENGTH, Easing.OutQuint);
|
||||||
mainContent.FadeEdgeEffectTo(0.4f, WaveContainer.APPEAR_DURATION, Easing.Out);
|
mainContent.FadeEdgeEffectTo(WaveContainer.SHADOW_OPACITY, WaveContainer.APPEAR_DURATION, Easing.Out);
|
||||||
|
|
||||||
toastTray.FlushAllToasts();
|
toastTray.FlushAllToasts();
|
||||||
}
|
}
|
||||||
|
@ -115,6 +115,7 @@ namespace osu.Game.Overlays
|
|||||||
Hollow = true,
|
Hollow = true,
|
||||||
Radius = 10
|
Radius = 10
|
||||||
},
|
},
|
||||||
|
MaskingSmoothness = 0,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
ExpandableHeader = CreateHeader(),
|
ExpandableHeader = CreateHeader(),
|
||||||
SelectedSection = { BindTarget = CurrentSection },
|
SelectedSection = { BindTarget = CurrentSection },
|
||||||
@ -166,7 +167,7 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
ContentContainer.MoveToX(ExpandedPosition, TRANSITION_LENGTH, Easing.OutQuint);
|
ContentContainer.MoveToX(ExpandedPosition, TRANSITION_LENGTH, Easing.OutQuint);
|
||||||
|
|
||||||
SectionsContainer.FadeEdgeEffectTo(0.4f, WaveContainer.APPEAR_DURATION, Easing.Out);
|
SectionsContainer.FadeEdgeEffectTo(WaveContainer.SHADOW_OPACITY, WaveContainer.APPEAR_DURATION, Easing.Out);
|
||||||
|
|
||||||
// delay load enough to ensure it doesn't overlap with the initial animation.
|
// delay load enough to ensure it doesn't overlap with the initial animation.
|
||||||
// this is done as there is still a brief stutter during load completion which is more visible if the transition is in progress.
|
// this is done as there is still a brief stutter during load completion which is more visible if the transition is in progress.
|
||||||
|
Loading…
Reference in New Issue
Block a user