1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 00:43:21 +08:00

Removed depth setting from PauseOverlay, removed shadow offset on PauseButton color(why was that even there?), fixed the triangles on PauseButton not masking to the sheared container, made PauseButton call it's action on MouseUp instead of MouseDown to match stable

This commit is contained in:
DrabWeb 2017-01-28 20:30:37 -04:00
parent 582599a8de
commit 6b57456681
3 changed files with 4 additions and 11 deletions

View File

@ -28,7 +28,7 @@ namespace osu.Desktop.VisualTests.Tests
ColourInfo = ColourInfo.GradientVertical(Color4.Gray, Color4.WhiteSmoke),
RelativeSizeAxes = Framework.Graphics.Axes.Both,
});
Add(pauseOverlay = new PauseOverlay());
Add(pauseOverlay = new PauseOverlay { Depth = -1 });
Add(new Button
{

View File

@ -59,15 +59,10 @@ namespace osu.Game.Overlays.Pause
public override bool Contains(Vector2 screenSpacePos) => backgroundContainer.Contains(screenSpacePos);
protected override bool OnMouseDown(Framework.Input.InputState state, MouseDownEventArgs args)
{
colourContainer.ResizeTo(new Vector2(colourWidth, 1f), 1000, EasingTypes.Out);
return true;
}
protected override bool OnMouseUp(Framework.Input.InputState state, MouseUpEventArgs args)
{
colourContainer.ResizeTo(new Vector2(1.1f, 1f), pressExpandTime, EasingTypes.In);
sampleClick?.Play();
Action?.Invoke();
return true;
}
@ -170,7 +165,6 @@ namespace osu.Game.Overlays.Pause
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(0.2f),
Radius = 5,
Offset = new Vector2(0, 5),
},
Colour = buttonColour,
Shear = new Vector2(shear, 0),
@ -183,7 +177,6 @@ namespace osu.Game.Overlays.Pause
},
new Triangles
{
Masking = true,
BlendingMode = BlendingMode.Additive,
RelativeSizeAxes = Axes.Both,
TriangleScale = 4,

View File

@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Pause
public Action OnRetry;
public Action OnQuit;
private SpriteText retryCounter; private PauseProgressBar progressBar;
private SpriteText retryCounter;
[BackgroundDependencyLoader]
@ -76,7 +76,7 @@ namespace osu.Game.Overlays.Pause
ShadowColour = new Color4(0, 0, 0, 0.25f),
TextSize = 18,
},
progressBar = new PauseProgressBar
new PauseProgressBar
{
Origin = Anchor.BottomCentre,
Anchor = Anchor.BottomCentre,