3333using osu . Framework . Allocation ;
3434using osu . Framework . Audio ;
3535using osu . Framework . Bindables ;
36+ using osu . Framework . Development ;
3637using osu . Framework . Extensions . IEnumerableExtensions ;
3738using osu . Framework . Graphics ;
3839using osu . Framework . Graphics . Containers ;
@@ -50,6 +51,7 @@ namespace fluXis.Screens.Menu;
5051public partial class MenuScreen : FluXisScreen
5152{
5253 public override float Zoom => pressedStart ? 1f : 1.2f ;
54+ public override float BackgroundDim => pressedStart ? 0.25f : 0f ;
5355 public override bool ShowToolbar => pressedStart ;
5456 public override bool AutoPlayNext => true ;
5557 protected override bool BackgroundAllowStoryboard => showStoryboard . Value && ( api . User . Value ? . IsSupporter ?? false ) ;
@@ -410,7 +412,6 @@ private void playStartAnimation()
410412 inactivityTime = 0 ;
411413 UISamples ? . Select ( ) ;
412414 randomizeSplash ( ) ;
413- backgrounds . Zoom = 1f ;
414415
415416 logoText . ScaleTo ( 1.1f , 1000 , Easing . OutQuint ) . FadeOut ( 600 ) ;
416417 animationCircle . BorderTo ( 60f ) . ResizeTo ( 0 )
@@ -419,6 +420,9 @@ private void playStartAnimation()
419420
420421 this . Delay ( 800 ) . FadeIn ( ) . OnComplete ( _ =>
421422 {
423+ backgrounds . Zoom = 1f ;
424+ backgrounds . SetDim ( 0.25f ) ;
425+
422426 toolbar . Show ( ) ;
423427 showMenu ( true ) ;
424428 } ) ;
@@ -430,9 +434,10 @@ private void revertStartAnimation()
430434 {
431435 toolbar . Hide ( ) ;
432436 backgrounds . Zoom = 1.2f ;
437+ backgrounds . SetDim ( 0f ) ;
433438 hideMenu ( ) ;
434439
435- logoText . Delay ( 800 ) . ScaleTo ( .9f ) . ScaleTo ( 1f , 800 , Easing . OutQuint ) . FadeIn ( 400 ) ;
440+ logoText . Delay ( 800 ) . ScaleTo ( 1.1f ) . ScaleTo ( 1f , 800 , Easing . OutQuint ) . FadeIn ( 400 ) ;
436441 this . Delay ( 800 ) . FadeIn ( ) . OnComplete ( _ => pressedStart = false ) ;
437442
438443 pressAnyKeyText . Delay ( 800 ) . MoveToY ( 0 , 800 , Easing . OutQuint ) ;
@@ -441,13 +446,19 @@ private void revertStartAnimation()
441446
442447 protected override bool OnKeyDown ( KeyDownEvent e )
443448 {
444- if ( e . Key == Key . Escape )
449+ switch ( e . Key )
445450 {
446- panels . Content ??= new ConfirmExitPanel ( ) ;
447- return true ;
448- }
451+ case Key . Escape :
452+ panels . Content ??= new ConfirmExitPanel ( ) ;
453+ return true ;
449454
450- return CanPlayAnimation ( ) ;
455+ case Key . BackSpace when DebugUtils . IsDebugBuild :
456+ revertStartAnimation ( ) ;
457+ return true ;
458+
459+ default :
460+ return CanPlayAnimation ( ) ;
461+ }
451462 }
452463
453464 protected override bool OnMouseDown ( MouseDownEvent e ) => CanPlayAnimation ( ) ;
0 commit comments