mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 17:03:02 +08:00
Fix race conditions causing menu transitions to look wrong when executed in very fast succession.
This commit is contained in:
parent
d06f0cf870
commit
34a030e3be
@ -272,11 +272,11 @@ namespace osu.Game.Screens.Menu
|
|||||||
{
|
{
|
||||||
sampleClick.Play();
|
sampleClick.Play();
|
||||||
|
|
||||||
|
clickAction?.Invoke();
|
||||||
|
|
||||||
boxHoverLayer.ClearTransformations();
|
boxHoverLayer.ClearTransformations();
|
||||||
boxHoverLayer.Alpha = 0.9f;
|
boxHoverLayer.Alpha = 0.9f;
|
||||||
boxHoverLayer.FadeOut(800, EasingTypes.OutExpo);
|
boxHoverLayer.FadeOut(800, EasingTypes.OutExpo);
|
||||||
|
|
||||||
clickAction?.Invoke();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool HandleInput => state != ButtonState.Exploded && box.Scale.X >= 0.8f;
|
public override bool HandleInput => state != ButtonState.Exploded && box.Scale.X >= 0.8f;
|
||||||
|
@ -146,7 +146,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
State = MenuState.Initial;
|
State = MenuState.Initial;
|
||||||
return true;
|
return true;
|
||||||
case MenuState.Play:
|
case MenuState.Play:
|
||||||
State = MenuState.TopLevel;
|
backButton.TriggerClick();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,7 +216,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
{
|
{
|
||||||
case MenuState.Initial:
|
case MenuState.Initial:
|
||||||
buttonAreaBackground.ScaleTo(Vector2.One, 500, EasingTypes.Out);
|
buttonAreaBackground.ScaleTo(Vector2.One, 500, EasingTypes.Out);
|
||||||
buttonArea.FadeOut(500);
|
buttonArea.FadeOut(300);
|
||||||
|
|
||||||
osuLogo.Delay(150);
|
osuLogo.Delay(150);
|
||||||
osuLogo.MoveTo(Vector2.Zero, 800, EasingTypes.OutExpo);
|
osuLogo.MoveTo(Vector2.Zero, 800, EasingTypes.OutExpo);
|
||||||
@ -229,6 +229,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
b.State = ButtonState.Contracted;
|
b.State = ButtonState.Contracted;
|
||||||
break;
|
break;
|
||||||
case MenuState.TopLevel:
|
case MenuState.TopLevel:
|
||||||
|
buttonArea.Flush(true);
|
||||||
|
|
||||||
buttonAreaBackground.ScaleTo(Vector2.One, 200, EasingTypes.Out);
|
buttonAreaBackground.ScaleTo(Vector2.One, 200, EasingTypes.Out);
|
||||||
|
|
||||||
osuLogo.MoveTo(buttonFlow.DrawPosition, 200, EasingTypes.In);
|
osuLogo.MoveTo(buttonFlow.DrawPosition, 200, EasingTypes.In);
|
||||||
|
Loading…
Reference in New Issue
Block a user