mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 15:05:34 +08:00
Adjusted the fade time of the pause overlay, put a fill behind the colour of PauseButton to fix an issue where the background gray is visible when the pause overlay is fading out
This commit is contained in:
parent
d0a22bfdd4
commit
c75b234b1a
@ -115,8 +115,8 @@ namespace osu.Game.Overlays.Pause
|
|||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = backgroundColour,
|
Colour = backgroundColour
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
glowContainer = new Container
|
glowContainer = new Container
|
||||||
@ -132,7 +132,15 @@ namespace osu.Game.Overlays.Pause
|
|||||||
Origin = Anchor.TopLeft,
|
Origin = Anchor.TopLeft,
|
||||||
Anchor = Anchor.TopLeft,
|
Anchor = Anchor.TopLeft,
|
||||||
Width = 0.125f,
|
Width = 0.125f,
|
||||||
ColourInfo = ColourInfo.GradientHorizontal(new Color4(buttonColour.R, buttonColour.G, buttonColour.B, glowGradientEndAlpha), buttonColour),
|
ColourInfo = ColourInfo.GradientHorizontal(new Color4(buttonColour.R, buttonColour.G, buttonColour.B, glowGradientEndAlpha), buttonColour)
|
||||||
|
},
|
||||||
|
new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Width = 0.75f,
|
||||||
|
Colour = buttonColour
|
||||||
},
|
},
|
||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
@ -140,8 +148,8 @@ namespace osu.Game.Overlays.Pause
|
|||||||
Origin = Anchor.TopRight,
|
Origin = Anchor.TopRight,
|
||||||
Anchor = Anchor.TopRight,
|
Anchor = Anchor.TopRight,
|
||||||
Width = 0.125f,
|
Width = 0.125f,
|
||||||
ColourInfo = ColourInfo.GradientHorizontal(buttonColour, new Color4(buttonColour.R, buttonColour.G, buttonColour.B, glowGradientEndAlpha)),
|
ColourInfo = ColourInfo.GradientHorizontal(buttonColour, new Color4(buttonColour.R, buttonColour.G, buttonColour.B, glowGradientEndAlpha))
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new Container
|
new Container
|
||||||
@ -164,7 +172,7 @@ namespace osu.Game.Overlays.Pause
|
|||||||
{
|
{
|
||||||
Type = EdgeEffectType.Shadow,
|
Type = EdgeEffectType.Shadow,
|
||||||
Colour = Color4.Black.Opacity(0.2f),
|
Colour = Color4.Black.Opacity(0.2f),
|
||||||
Radius = 5,
|
Radius = 5
|
||||||
},
|
},
|
||||||
Colour = buttonColour,
|
Colour = buttonColour,
|
||||||
Shear = new Vector2(shear, 0),
|
Shear = new Vector2(shear, 0),
|
||||||
@ -173,7 +181,7 @@ namespace osu.Game.Overlays.Pause
|
|||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
EdgeSmoothness = new Vector2(2, 0),
|
EdgeSmoothness = new Vector2(2, 0),
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both
|
||||||
},
|
},
|
||||||
new Triangles
|
new Triangles
|
||||||
{
|
{
|
||||||
@ -181,10 +189,10 @@ namespace osu.Game.Overlays.Pause
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
TriangleScale = 4,
|
TriangleScale = 4,
|
||||||
Alpha = 0.05f,
|
Alpha = 0.05f,
|
||||||
Shear = new Vector2(-shear, 0),
|
Shear = new Vector2(-shear, 0)
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new SpriteText
|
new SpriteText
|
||||||
@ -196,8 +204,8 @@ namespace osu.Game.Overlays.Pause
|
|||||||
Font = "Exo2.0-Bold",
|
Font = "Exo2.0-Bold",
|
||||||
Shadow = true,
|
Shadow = true,
|
||||||
ShadowColour = new Color4(0, 0, 0, 0.1f),
|
ShadowColour = new Color4(0, 0, 0, 0.1f),
|
||||||
Colour = Color4.White,
|
Colour = Color4.White
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ namespace osu.Game.Overlays.Pause
|
|||||||
{
|
{
|
||||||
public class PauseOverlay : OverlayContainer
|
public class PauseOverlay : OverlayContainer
|
||||||
{
|
{
|
||||||
private int fadeDuration = 100;
|
private int fadeDuration = 200;
|
||||||
|
|
||||||
public Action OnResume;
|
public Action OnResume;
|
||||||
public Action OnRetry;
|
public Action OnRetry;
|
||||||
|
Loading…
Reference in New Issue
Block a user